Index: branches/5.1.x/core/units/categories/categories_event_handler.php =================================================================== diff -u -N -r13984 -r13987 --- branches/5.1.x/core/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 13984) +++ branches/5.1.x/core/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 13987) @@ -1,6 +1,6 @@ Application->GetVar($event->getPrefixSpecial() . '_id'); - $home_category = $this->Application->findModule('Name', 'Core', 'RootCat'); + $home_category = $this->Application->getBaseCategory(); $this->Application->StoreVar('IsRootCategory_'.$this->Application->GetVar('m_wid'), ($category_id === '0') || ($category_id == $home_category)); @@ -291,7 +291,7 @@ if ("$parent_cat_id" == '0') { // replace "0" category with "Content" category id (this way template - $parent_cat_id = $this->Application->findModule('Name', 'Core', 'RootCat'); + $parent_cat_id = $this->Application->getBaseCategory(); } if ("$parent_cat_id" != 'any') { @@ -758,7 +758,7 @@ // 2. preset template $category_id = $this->Application->GetVar('m_cat_id'); - $root_category = $this->Application->findModule('Name', 'Core', 'RootCat'); + $root_category = $this->Application->getBaseCategory(); if ($category_id == $root_category) { $object->SetDBField('Template', $this->_getDefaultDesign()); } @@ -1589,7 +1589,7 @@ $this->_saveTitleField($object, 'Title'); $this->_saveTitleField($object, 'MenuTitle'); - $root_category = $this->Application->findModule('Name', 'Core', 'RootCat'); + $root_category = $this->Application->getBaseCategory(); if (($object->GetDBField('ParentId') == $root_category) && ($object->GetDBField('Template') == CATEGORY_TEMPLATE_INHERIT)) { $object->SetError('Template', 'no_inherit'); @@ -1672,7 +1672,7 @@ $theme_id = $this->_getCurrentThemeId(); } - $root_category = $this->Application->findModule('Name', 'Core', 'RootCat'); + $root_category = $this->Application->getBaseCategory(); $page_category = $this->Application->GetVar('m_cat_id'); if (!$page_category) { $page_category = $root_category; @@ -1869,7 +1869,7 @@ $settings = $site_config_helper->getSettings(); - $root_category = $this->Application->findModule('Name', 'Core', 'RootCat'); + $root_category = $this->Application->getBaseCategory(); // set root category $section_ajustments = $this->Application->getUnitOption($event->Prefix, 'SectionAdjustments');