Index: trunk/core/kernel/application.php =================================================================== diff -u -N -r2392 -r2432 --- trunk/core/kernel/application.php (.../application.php) (revision 2392) +++ trunk/core/kernel/application.php (.../application.php) (revision 2432) @@ -127,15 +127,15 @@ $this->DB->Connect(SQL_SERVER, SQL_USER, SQL_PASS, SQL_DB); $this->DB->debugMode = $this->isDebugMode(); - $this->SetDefaultConstants(); - $this->Factory = new kFactory(); - + $this->registerDefaultClasses(); - // 1. to read configs before doing any recallObject - $config_reader =& $this->recallObject('kUnitConfigReader'); + $this->SetDefaultConstants(); + // 1. to read configs before doing any recallObject (called from "SetDefaultConstants" anyway) + //$config_reader =& $this->recallObject('kUnitConfigReader'); + if( !$this->GetVar('m_lang') ) $this->SetVar('m_lang', $this->GetDefaultLanguageId() ); if( !$this->GetVar('m_theme') ) $this->SetVar('m_theme', $this->GetDefaultThemeId() ); if( $this->GetVar('m_cat_id') === false ) $this->SetVar('m_cat_id', 0); @@ -288,8 +288,24 @@ $admin_dir = $this->ConfigValue('AdminDirectory'); if(!$admin_dir) $admin_dir = 'admin'; safeDefine('ADMIN_DIR', $admin_dir); + + $this->registerModuleConstants(); } + /** + * Registers each module specific constants if any found + * + */ + function registerModuleConstants() + { + $unit_config_reader =& $this->recallObject('kUnitConfigReader'); + foreach($unit_config_reader->modules_installed as $module_path) + { + $contants_file = DOC_ROOT.BASE_PATH.$module_path.'constants.php'; + if( file_exists($contants_file) ) k4_include_once($contants_file); + } + } + function ProcessRequest() { $event_manager =& $this->recallObject('EventManager'); Index: trunk/kernel/admin/include/summary/root.php =================================================================== diff -u -N -r2027 -r2432 --- trunk/kernel/admin/include/summary/root.php (.../root.php) (revision 2027) +++ trunk/kernel/admin/include/summary/root.php (.../root.php) (revision 2432) @@ -134,8 +134,6 @@ function PendingCell($params, $class, &$pending_count) { - safeDefine('ORDER_STATUS_PENDING', 1); - $list_name = getArrayValue($params, 'list_var_name'); $prefix_pos = strpos($list_name, ':');