Index: branches/RC/core/install/upgrades.php =================================================================== diff -u -N -r11623 -r11705 --- branches/RC/core/install/upgrades.php (.../upgrades.php) (revision 11623) +++ branches/RC/core/install/upgrades.php (.../upgrades.php) (revision 11705) @@ -871,6 +871,22 @@ } } + /** + * 1. Set root category not to generate filename automatically and hide it from catalog + * 2. Hide root category of In-Edit and set it's fields + * + * @param int $category_id + */ + function _resetRootCategory($category_id) + { + $fields_hash = Array ( + 'l1_Name' => 'Content', 'Filename' => 'Content', 'AutomaticFilename' => 0, + 'l1_Description' => 'Content', 'Status' => 4, + ); + + $this->Conn->doUpdate($fields_hash, TABLE_PREFIX . 'Category', 'CategoryId = ' . $category_id); + } + function _createProjCMSTables() { // 0. make sure, that Content category exists @@ -882,6 +898,8 @@ $this->Conn->Query($sql); unset($this->Application->ModuleInfo['Proj-CMS']); + $this->_resetRootCategory($root_category); + // unhide all structure categories $sql = 'UPDATE ' . TABLE_PREFIX . 'Category SET Status = 1 @@ -896,13 +914,7 @@ $this->Conn->Query($sql); unset($this->Application->ModuleInfo['In-Edit']); - // hide root category of In-Edit and set it's fields - $fields_hash = Array ( - 'l1_Name' => 'Content', 'Filename' => 'Content', 'AutomaticFilename' => 0, - 'l1_Description' => 'Content', 'Status' => 4, - ); - - $this->Conn->doUpdate($fields_hash, TABLE_PREFIX . 'Category', 'CategoryId = ' . $root_category); + $this->_resetRootCategory($root_category); } }