User 'motobelfqtmtbpre' has exceeded the 'max_questions' resource (current value: 40000)SELECT m.`id_module`, m.`name`, (SELECT COUNT(*) FROM `ps_module_shop` ms WHERE m.`id_module` = ms.`id_module` AND ms.`id_shop` IN (1)) as total FROM `ps_module` m
at line 604 in file classes/db/Db.php
598. if ($webservice_call && $errno)
599. WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. Query was : '.$sql, 97);
600. else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))
601. {
602. if ($sql)
603. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
604. throw new PrestaShopDatabaseException($this->getMsgError());
605. }
606. }
607.
608. /**
302. if ($sql instanceof DbQuery)
303. $sql = $sql->build();
304.
305. $this->result = $this->_query($sql);
306. if (_PS_DEBUG_SQL_) {
307. $this->displayError($sql);
308. }
309. return $this->result;
310. }
311.
312. /**
Argument [0] SELECT m.`id_module`, m.`name`, (SELECT COUNT(*) FROM `ps_module_shop` ms WHERE m.`id_module` = ms.`id_module` AND ms.`id_shop` IN (1)) as total FROM `ps_module` m
478. {
479. $this->last_cached = true;
480. return $result;
481. }
482.
483. $this->result = $this->query($sql);
484. if (!$this->result)
485. return false;
486.
487. $this->last_cached = false;
488. if (!$array)
Argument [0] SELECT m.`id_module`, m.`name`, (SELECT COUNT(*) FROM `ps_module_shop` ms WHERE m.`id_module` = ms.`id_module` AND ms.`id_shop` IN (1)) as total FROM `ps_module` m
145. $sql_limit_shop = 'SELECT COUNT(*) FROM `'._DB_PREFIX_.'module_shop` ms WHERE m.`id_module` = ms.`id_module` AND ms.`id_shop` IN ('.implode(',', $list).')';
146. $sql = 'SELECT m.`id_module`, m.`name`, ('.$sql_limit_shop.') as total FROM `'._DB_PREFIX_.'module` m';
147.
148. // Result is cached
149. self::$modules_cache = array();
150. $result = Db::getInstance()->executeS($sql);
151. foreach ($result as $row)
152. {
153. self::$modules_cache[$row['name']] = $row;
154. self::$modules_cache[$row['name']]['active'] = ($row['total'] == count($list)) ? true : false;
155. }
Argument [0] SELECT m.`id_module`, m.`name`, (SELECT COUNT(*) FROM `ps_module_shop` ms WHERE m.`id_module` = ms.`id_module` AND ms.`id_shop` IN (1)) as total FROM `ps_module` m
35. $this->tab = 'front_office_features';
36. $this->version = 0.2;
37. $this->author = 'PrestaShop';
38. $this->need_instance = 0;
39.
40. parent::__construct();
41.
42. $this->displayName = $this->l('Block payment logo');
43. $this->description = $this->l('Adds a block to display all payment logos.');
44. }
45.
833. if (Tools::file_exists_cache(_PS_MODULE_DIR_.$module_name.'/'.$module_name.'.php'))
834. {
835. include_once(_PS_MODULE_DIR_.$module_name.'/'.$module_name.'.php');
836.
837. if (class_exists($module_name, false))
838. return self::$_INSTANCE[$module_name] = new $module_name;
839. }
840. return false;
841. }
842. return self::$_INSTANCE[$module_name];
843. }
347. foreach ($module_list as $array)
348. {
349. // Check errors
350. if ($id_module && $id_module != $array['id_module'])
351. continue;
352. if (!($moduleInstance = Module::getInstanceByName($array['module'])))
353. continue;
354.
355. // Check permissions
356. $exceptions = $moduleInstance->getExceptions($array['id_hook']);
357. if (in_array(Dispatcher::getInstance()->getController(), $exceptions))
Argument [0] blockpaymentlogo
450.
451. if ($this->context->getMobileDevice() == false)
452. {
453. // These hooks aren't used for the mobile theme.
454. // Needed hooks are called in the tpl files.
455. $Header = Hook::exec('displayHeader');
456.
457. $Top = Hook::exec('displayTop');
458.
459. $Left = '';
460. if($this->display_column_left) {
Argument [0] displayHeader
138. * Assign template vars related to page content
139. * @see FrontController::initContent()
140. */
141. public function initContent()
142. {
143. parent::initContent();
144.
145. if (!$this->errors)
146. {
147. // Assign to the template the id of the virtual product. "0" if the product is not downloadable.
148. $this->context->smarty->assign('virtual', ProductDownload::getIdFromIdProduct((int)$this->product->id));
163. }
164. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className)))
165. $this->initHeader();
166.
167. if ($this->viewAccess()) {
168. $this->initContent();
169. }
170. else {
171. $this->errors[] = Tools::displayError('Access denied.');
172. }
173.
390. {
391. $mycontroller = Controller::getController($controller_class);
392. if( $_SERVER['REMOTE_ADDR']== IP_DEBUG_BLAISE) {
393. // mail('blaise2@motobel.fr', $time_start . ' ' . __FILE__ . ' ' . __LINE__, $_SERVER['REQUEST_URI'] . print_r($this, true));
394. }
395. $mycontroller->run();
396. if( $_SERVER['REMOTE_ADDR']== IP_DEBUG_BLAISE) {
397. // mail('blaise2@motobel.fr', $time_start . ' ' . __FILE__ . ' ' . __LINE__, $_SERVER['REQUEST_URI'] . print_r($this, true));
398. }
399. }
400. catch (PrestaShopException $e)
75.
76. if( $_SERVER['REMOTE_ADDR']== IP_DEBUG_BLAISE) {
77. //mail('blaise2@motobel.fr', $time_start . ' ' . __FILE__ . ' ' . __LINE__, $_SERVER['REQUEST_URI']);
78. }
79.
80. Dispatcher::getInstance()->dispatch();
81.
82. $time_end = microtime(true);
83. $delay = $time_end - $time_start;
84. if($delay > 1) {
85. // error_log(__FILE__ . ' ' . __LINE__ . ' ' . $delay);