Index: branches/5.2.x/core/units/categories/categories_tag_processor.php =================================================================== diff -u -N -r13840 -r14092 --- branches/5.2.x/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 13840) +++ branches/5.2.x/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 14092) @@ -1,6 +1,6 @@ getObject($params); /* @var $object kDBList */ - if ($object->GetDBField('CreatedBySystem')) { + if ($object->GetDBField('ThemeId') > 0) { if (!$object->GetDBField('IsMenu')) { return $icon_prefix . 'section_menuhidden_system.png'; } @@ -266,6 +266,9 @@ if (!array_key_exists('direct_link', $params) || !$params['direct_link']) { $category_id = $this->getCategorySymLink( (int)$category_id ); } + else { + unset($params['direct_link']); + } unset($params['cat_id'], $params['module']); @@ -506,9 +509,10 @@ $updater->setData(); } else { - // all done -> redirect + // all done, update left tree and redirect $updater->SaveData(); $this->Application->RemoveVar('PermCache_UpdateRequired'); + $this->Application->StoreVar('RefreshStructureTree', 1); $this->Application->Redirect($params['destination_template']); } @@ -599,13 +603,7 @@ */ function HomeCategory($params) { - static $root_category = null; - - if (!isset($root_category)) { - $root_category = $this->Application->findModule('Name', 'Core', 'RootCat'); - } - - return $root_category; + return $this->Application->getBaseCategory(); } /** @@ -616,7 +614,7 @@ */ function ModuleRootCategory($params) { - return $this->Application->GetVar('m_cat_id') == $this->HomeCategory($params); + return $this->Application->GetVar('m_cat_id') == $this->Application->getBaseCategory(); } function CatalogItemCount($params) @@ -1958,4 +1956,16 @@ return $json_helper->encode($categories); } + + function PageEditable($params) + { + if ($this->Application->isDebugMode()) { + return true; + } + + $object =& $this->getObject($params); + /* @var $object kDBItem */ + + return !$object->GetDBField('Protected'); + } } \ No newline at end of file