Index: branches/unlabeled/unlabeled-1.11.2/core/units/general/helpers/sections_helper.php =================================================================== diff -u -r6936 -r7033 --- branches/unlabeled/unlabeled-1.11.2/core/units/general/helpers/sections_helper.php (.../sections_helper.php) (revision 6936) +++ branches/unlabeled/unlabeled-1.11.2/core/units/general/helpers/sections_helper.php (.../sections_helper.php) (revision 7033) @@ -89,11 +89,6 @@ $section_params['onclick'] = 'checkEditMode()'; } - if (isset($section_params['icon']) && preg_match('/([^:]+):(.*)/', $section_params['icon'], $regs)) { - $section_params['icon'] = $regs[2]; - $section_params['icon_module'] = $regs[1]; - } - $current_data = isset($this->Tree[$section_name]) ? $this->Tree[$section_name] : Array(); $this->Tree[$section_name] = array_merge_recursive2($current_data, $section_params); } @@ -116,14 +111,21 @@ } } - // 3. update parent -> children references + // 3. foreach ($this->Tree as $section_name => $section_params) { + // 3.1. update parent -> children references $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; } + + // 3.2. process icons here, because they also can be ajusted + if (isset($section_params['icon']) && preg_match('/([^:]+):(.*)/', $section_params['icon'], $regs)) { + $this->Tree[$section_name]['icon'] = $regs[2]; + $this->Tree[$section_name]['icon_module'] = $regs[1]; + } } $this->Conn->Query('REPLACE '.TABLE_PREFIX.'Cache (VarName, Data, Cached) VALUES ("sections_parsed", '.$this->Conn->qstr(serialize($this->Tree)).', '.adodb_mktime().')');