Index: trunk/core/kernel/startup.php =================================================================== diff -u -N -r4762 -r4770 --- trunk/core/kernel/startup.php (.../startup.php) (revision 4762) +++ trunk/core/kernel/startup.php (.../startup.php) (revision 4770) @@ -58,7 +58,6 @@ if( ini_get('safe_mode') ) define('SAFE_MODE', 1); - safeDefine('CACHE_CONFIGS_FILES', 1); safeDefine('EXPERIMENTAL_PRE_PARSE', 1); safeDefine('SILENT_LOG', 0); @@ -73,7 +72,7 @@ $debugger->profileStart('inc_globals', KERNEL_PATH.'/globals.php', $globals_start); $debugger->profileFinish('inc_globals', KERNEL_PATH.'/globals.php', $globals_end); $debugger->profilerAddTotal('includes', 'inc_globals'); - + $debugger->profileStart('inc_debugger', KERNEL_PATH.'/utility/debugger.php', $debugger_start); $debugger->profileFinish('inc_debugger', KERNEL_PATH.'/utility/debugger.php', $debugger_end); $debugger->profilerAddTotal('includes', 'inc_debugger'); Index: trunk/core/kernel/utility/unit_config_reader.php =================================================================== diff -u -N -r4766 -r4770 --- trunk/core/kernel/utility/unit_config_reader.php (.../unit_config_reader.php) (revision 4766) +++ trunk/core/kernel/utility/unit_config_reader.php (.../unit_config_reader.php) (revision 4770) @@ -117,21 +117,16 @@ function scanModules($folderPath) { - if (defined('CACHE_PARSED_CONFIGS') && CACHE_PARSED_CONFIGS) { - $restored = $this->RestoreParsedData(); - if ($restored) return; - } + $restored = $this->RestoreParsedData(); + if ($restored) return; + $this->includeConfigFiles(); $this->ParseConfigs(); - if (defined('CACHE_PARSED_CONFIGS')) { - $this->CacheParsedData(); - } + $this->CacheParsedData(); - if (defined('CACHE_CONFIGS_FILES') && $files_cached == 0) { - $conn =& $this->Application->GetADODBConnection(); - $conn->Query('REPLACE '.TABLE_PREFIX.'Cache (VarName, Data, Cached) VALUES ("config_files", '.$conn->qstr(serialize($this->configFiles)).', '.adodb_mktime().')'); - } + $conn =& $this->Application->GetADODBConnection(); + $conn->Query('REPLACE '.TABLE_PREFIX.'Cache (VarName, Data, Cached) VALUES ("config_files", '.$conn->qstr(serialize($this->configFiles)).', '.adodb_mktime().')'); unset($this->configFiles); } @@ -200,16 +195,12 @@ function includeConfigFiles() { $this->Application->refreshModuleInfo(); - if (defined('CACHE_CONFIGS_FILES')) { - $conn =& $this->Application->GetADODBConnection(); - $data = $conn->GetRow('SELECT Data, Cached FROM '.TABLE_PREFIX.'Cache WHERE VarName = "config_files"'); - if ($data && $data['Cached'] > 0 ) { - $this->configFiles = unserialize($data['Data']); - $files_cached = $data['Cached']; - } - else { - $this->findConfigFiles(''); // search from base directory - } + + $conn =& $this->Application->GetADODBConnection(); + $data = $conn->GetRow('SELECT Data, Cached FROM '.TABLE_PREFIX.'Cache WHERE VarName = "config_files"'); + if ($data && $data['Cached'] > 0 ) { + $this->configFiles = unserialize($data['Data']); + $files_cached = $data['Cached']; } else { $this->findConfigFiles(''); // search from base directory Index: trunk/kernel/units/general/helpers/sections_helper.php =================================================================== diff -u -N -r4758 -r4770 --- trunk/kernel/units/general/helpers/sections_helper.php (.../sections_helper.php) (revision 4758) +++ trunk/kernel/units/general/helpers/sections_helper.php (.../sections_helper.php) (revision 4770) @@ -25,7 +25,7 @@ parent::Init($prefix, $special, $event_params); $this->BuildTree(); } - + /** * Builds xml for tree in left frame in admin * @@ -34,14 +34,12 @@ function BuildTree() { $unit_config_reader = false; - if (defined('CACHE_PARSED_CONFIGS') && CACHE_PARSED_CONFIGS) { - $data = $this->Conn->GetRow('SELECT Data, Cached FROM '.TABLE_PREFIX.'Cache WHERE VarName = "sections_parsed"'); - if ($data) { - $this->Tree = unserialize($data['Data']); - return ; - } - $this->Application->UnitConfigReader->includeConfigFiles(); + $data = $this->Conn->GetRow('SELECT Data, Cached FROM '.TABLE_PREFIX.'Cache WHERE VarName = "sections_parsed"'); + if ($data) { + $this->Tree = unserialize($data['Data']); + return ; } + $this->Application->UnitConfigReader->includeConfigFiles(); $this->Tree = Array(); if (!$unit_config_reader) { @@ -79,18 +77,15 @@ $this->Tree[$section_name] = array_merge_recursive2($current_data, $section_params); $this->Tree[ $section_params['parent'] ]['children'][ "{$section_params['priority']}" ] = $section_name; - + if ($section_params['type'] == stTAB) { // if this is tab, then mark parent section as TabOnly $this->Tree[ $section_params['parent'] ]['tabs_only'] = true; } } } - if (defined('CACHE_PARSED_CONFIGS') && CACHE_PARSED_CONFIGS) { - $this->Conn->Query('REPLACE '.TABLE_PREFIX.'Cache (VarName, Data, Cached) VALUES ("sections_parsed", '.$this->Conn->qstr(serialize($this->Tree)).', '.adodb_mktime().')'); - } - + $this->Conn->Query('REPLACE '.TABLE_PREFIX.'Cache (VarName, Data, Cached) VALUES ("sections_parsed", '.$this->Conn->qstr(serialize($this->Tree)).', '.adodb_mktime().')'); } /** Index: trunk/core/units/general/helpers/sections_helper.php =================================================================== diff -u -N -r4758 -r4770 --- trunk/core/units/general/helpers/sections_helper.php (.../sections_helper.php) (revision 4758) +++ trunk/core/units/general/helpers/sections_helper.php (.../sections_helper.php) (revision 4770) @@ -25,7 +25,7 @@ parent::Init($prefix, $special, $event_params); $this->BuildTree(); } - + /** * Builds xml for tree in left frame in admin * @@ -34,14 +34,12 @@ function BuildTree() { $unit_config_reader = false; - if (defined('CACHE_PARSED_CONFIGS') && CACHE_PARSED_CONFIGS) { - $data = $this->Conn->GetRow('SELECT Data, Cached FROM '.TABLE_PREFIX.'Cache WHERE VarName = "sections_parsed"'); - if ($data) { - $this->Tree = unserialize($data['Data']); - return ; - } - $this->Application->UnitConfigReader->includeConfigFiles(); + $data = $this->Conn->GetRow('SELECT Data, Cached FROM '.TABLE_PREFIX.'Cache WHERE VarName = "sections_parsed"'); + if ($data) { + $this->Tree = unserialize($data['Data']); + return ; } + $this->Application->UnitConfigReader->includeConfigFiles(); $this->Tree = Array(); if (!$unit_config_reader) { @@ -79,18 +77,15 @@ $this->Tree[$section_name] = array_merge_recursive2($current_data, $section_params); $this->Tree[ $section_params['parent'] ]['children'][ "{$section_params['priority']}" ] = $section_name; - + if ($section_params['type'] == stTAB) { // if this is tab, then mark parent section as TabOnly $this->Tree[ $section_params['parent'] ]['tabs_only'] = true; } } } - if (defined('CACHE_PARSED_CONFIGS') && CACHE_PARSED_CONFIGS) { - $this->Conn->Query('REPLACE '.TABLE_PREFIX.'Cache (VarName, Data, Cached) VALUES ("sections_parsed", '.$this->Conn->qstr(serialize($this->Tree)).', '.adodb_mktime().')'); - } - + $this->Conn->Query('REPLACE '.TABLE_PREFIX.'Cache (VarName, Data, Cached) VALUES ("sections_parsed", '.$this->Conn->qstr(serialize($this->Tree)).', '.adodb_mktime().')'); } /**