Index: branches/RC/core/units/general/helpers/sections_helper.php =================================================================== diff -u -N -r10580 -r10951 --- branches/RC/core/units/general/helpers/sections_helper.php (.../sections_helper.php) (revision 10580) +++ branches/RC/core/units/general/helpers/sections_helper.php (.../sections_helper.php) (revision 10951) @@ -34,7 +34,7 @@ function BuildTree() { if (!isset($this->Application->Memcached) || !($data = $this->Application->Memcached->get('master:sections_parsed'))) { - $data = $this->Conn->GetOne('SELECT Data FROM '.TABLE_PREFIX.'Cache WHERE VarName = "sections_parsed"'); + $data = $this->Conn->GetOne('SELECT Data FROM '.TABLE_PREFIX.'Cache WHERE VarName = "sections_parsed"'); } if ($data) { $this->Tree = unserialize($data); @@ -126,12 +126,17 @@ // 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->Tree[$section_name]['icon_module'] = $regs[1]; // set "icon_module" used in "combined_header" block $module_folder = trim( $this->Application->findModule('Name', $regs[1], 'Path'), '/'); - if ($module_folder == '') $module_folder = 'core'; + if ($module_folder == '') { + $module_folder = 'core'; + } } else { $module_folder = $this->Application->getUnitOption($section_params['SectionPrefix'], 'ModuleFolder'); + if (!array_key_exists('icon_module', $section_params)) { + $this->Tree[$section_name]['icon_module'] = $module_folder; // set "icon_module" used in "combined_header" block + } } // this is to display HELP icon instead of missing one.. can be replaced with some other icon to draw attention @@ -147,7 +152,7 @@ $this->Application->Memcached->set('master:sections_parsed',serialize($this->Tree), 0, 0); return; } - + $this->Conn->Query('REPLACE '.TABLE_PREFIX.'Cache (VarName, Data, Cached) VALUES ("sections_parsed", '.$this->Conn->qstr(serialize($this->Tree)).', '.adodb_mktime().')'); }