Esempio n. 1
0
    public function getExceptions($id_hook)
    {
        if (self::$exceptionsCache == NULL and !is_array(self::$exceptionsCache)) {
            self::$exceptionsCache = array();
            $result = Db::getInstance()->ExecuteS('
			SELECT CONCAT(id_hook, \'-\', id_module) as `key`, `file_name` as value
			FROM `' . _DB_PREFIX_ . 'hook_module_exceptions`');
            foreach ($result as $row) {
                if (empty($row['value'])) {
                    continue;
                }
                if (!array_key_exists($row['key'], self::$exceptionsCache)) {
                    self::$exceptionsCache[$row['key']] = array();
                }
                self::$exceptionsCache[$row['key']][] = array('file_name' => $row['value']);
            }
        }
        return array_key_exists((int) $id_hook . '-' . (int) $this->id, self::$exceptionsCache) ? self::$exceptionsCache[(int) $id_hook . '-' . (int) $this->id] : array();
    }
 protected function l($string, $class = 'AdminTab', $addslashes = FALSE, $htmlentities = TRUE)
 {
     if (version_compare(_PS_VERSION_, '1.4.3.0', '<')) {
         $currentClass = get_class($this);
         // need to be called in order to populate $classInModule
         return SelfModule::findTranslation('autoupgrade', $string, 'AdminSelfUpgrade');
     } else {
         return parent::l($string, $class, $addslashes, $htmlentities);
     }
 }