Ejemplo n.º 1
0
 public static function getModules()
 {
     if (!($modules =& self::$modules)) {
         $default = array('ACTIVE' => !ModuleManager::isModuleInstalled('sale'));
         foreach (array(AttributeManager::getTypesInternal(), CounterManager::getTypesInternal(), RateManager::getTypesInternal()) as $types) {
             foreach ($types as $type) {
                 $modules[$type['MODULE']] = $default;
             }
         }
         if ($modules['sale']) {
             $modules['sale']['ACTIVE'] = true;
         }
         $modules = unserialize(Option::get('conversion', 'MODULES', 'a:0:{}')) + $modules;
         // TODO all modules with attributes must be active
         $modules['conversion'] = $modules['abtest'] = $modules['sender'] = $modules['seo'] = array('ACTIVE' => true);
         ksort($modules);
     }
     return $modules;
 }