Index: trunk/core/kernel/utility/unit_config_reader.php =================================================================== diff -u -r3282 -r3330 --- trunk/core/kernel/utility/unit_config_reader.php (.../unit_config_reader.php) (revision 3282) +++ trunk/core/kernel/utility/unit_config_reader.php (.../unit_config_reader.php) (revision 3330) @@ -14,14 +14,6 @@ var $CacheExpired = false; /** - * Module names found during - * config reading - * - * @var Array - */ - var $modules_installed = Array(); - - /** * Scan kernel and user classes * for available configs * @@ -30,9 +22,6 @@ function Init($prefix,$special) { parent::Init($prefix,$special); - - $db =& $this->Application->GetADODBConnection(); - $this->modules_installed = $db->GetCol('SELECT CONCAT(\'/\',Path) AS Path, Name FROM '.TABLE_PREFIX.'Modules WHERE Loaded = 1','Name'); $this->scanModules(MODULES_PATH); } @@ -44,8 +33,11 @@ function configAllowed($config_path) { $module_found = false; - foreach($this->modules_installed as $module_path) + if (!$this->Application->ModuleInfo) return false; + + foreach($this->Application->ModuleInfo as $module_name => $module_info) { + $module_path = '/'.$module_info['Path']; if( substr($config_path, 0, strlen($module_path)) == $module_path ) { $module_found = true; @@ -151,7 +143,7 @@ $fh=opendir(FULL_PATH.$folderPath); while(($sub_folder=readdir($fh))) { - $full_path=FULL_PATH.$folderPath.'/'.$sub_folder; + $full_path = FULL_PATH.$folderPath.'/'.$sub_folder; if( $this->isDir($full_path)) { if ( file_exists(FULL_PATH.$this->getConfigName($folderPath.'/'.$sub_folder)) ) {