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().')'); } /**