Index: trunk/core/kernel/application.php =================================================================== diff -u -N -r2743 -r2838 --- trunk/core/kernel/application.php (.../application.php) (revision 2743) +++ trunk/core/kernel/application.php (.../application.php) (revision 2838) @@ -315,12 +315,14 @@ */ function registerModuleConstants() { - $unit_config_reader =& $this->recallObject('kUnitConfigReader'); - foreach($unit_config_reader->modules_installed as $module_path) + $modules_installed = $this->DB->GetCol('SELECT CONCAT(\'/\',Path) AS Path, Name FROM '.TABLE_PREFIX.'Modules WHERE Loaded = 1','Name'); + foreach($modules_installed as $module_path) { $contants_file = FULL_PATH.$module_path.'constants.php'; if( file_exists($contants_file) ) k4_include_once($contants_file); } + + $unit_config_reader =& $this->recallObject('kUnitConfigReader'); } function ProcessRequest() @@ -1346,4 +1348,4 @@ } -?> \ No newline at end of file +?>