Index: branches/5.3.x/core/units/admin/admin_events_handler.php =================================================================== diff -u -N -r15677 -r15698 --- branches/5.3.x/core/units/admin/admin_events_handler.php (.../admin_events_handler.php) (revision 15677) +++ branches/5.3.x/core/units/admin/admin_events_handler.php (.../admin_events_handler.php) (revision 15698) @@ -1,6 +1,6 @@ Application->prefixRegistred($prefix) ) { // when prefix is found -> use it's table (don't affect K3 tables named in lowecase) - $table_name = $this->Application->getUnitOption($prefix, 'TableName'); + $table_name = $this->Application->getUnitConfig($prefix)->getTableName(); } } @@ -924,17 +924,15 @@ { parent::OnAfterConfigRead($event); - $section_adjustments = $this->Application->getUnitOption($event->Prefix, 'SectionAdjustments', Array()); + $config = $event->getUnitConfig(); if ( !$this->Application->ConfigValue('AdvancedUserManagement') ) { - $section_adjustments['in-portal:user_groups'] = 'remove'; + $config->addSectionAdjustments('remove', 'in-portal:user_groups'); } - $section_adjustments['in-portal:root'] = Array ( + $config->addSectionAdjustments(Array ( 'label' => $this->Application->ConfigValue('Site_Name') - ); - - $this->Application->setUnitOption($event->Prefix, 'SectionAdjustments', $section_adjustments); + ), 'in-portal:root'); } /** @@ -1149,13 +1147,13 @@ // rules from all enabled themes $sql = 'SELECT ImageResizeRules - FROM ' . $this->Application->getUnitOption('theme', 'TableName') . ' + FROM ' . $this->Application->getUnitConfig('theme')->getTableName() . ' WHERE Enabled = 1'; $mass_resizer->addRules($this->Conn->GetCol($sql)); $mass_resizer->run(); } - + /** * Returns popup size (by template), if not cached, then parse template to get value * @@ -1295,7 +1293,7 @@ foreach ($this->_unitFields as $prefix => $fields) { $sql = 'SELECT ' . implode(',', array_unique($fields)) . ' - FROM ' . $this->Application->getUnitOption($prefix, 'TableName'); + FROM ' . $this->Application->getUnitConfig($prefix)->getTableName(); $unit_data = $this->Conn->GetIterator($sql); if ( !count($unit_data) ) {