Index: install/english.lang =================================================================== --- install/english.lang (revision 13756) +++ install/english.lang (working copy) @@ -931,7 +931,6 @@ UmVzdG9yZSBTdGF0dXM= UmVzdG9yZSBoYXMgYmVlbiBjb21wbGV0ZWQgc3VjY2Vzc2Z1bGx5 U2VsZWN0IE1vZHVsZSBSb290IFNlY3Rpb246 - Um9vdCBzZWN0aW9uIG5hbWUgKGxhbmd1YWdlIHZhcmlhYmxlKQ== Um9vdCBQYXNzd29yZA== U2VhcmNoIFR5cGU= U2VsZWN0IFNvdXJjZSBMYW5ndWFnZQ== @@ -976,6 +975,7 @@ Tm90IGFsbCByZXF1aXJlZCBmaWVsZHMgYXJlIGZpbGxlZC4gUGxlYXNlIGZpbGwgdGhlbSBmaXJzdC4= Q29tbWVudHMgcGVyIFBhZ2U= Q29tbWVudHMgcGVyIFBhZ2UgKHNob3J0LWxpc3Qp + SG9tZQ== U2FtcGxlIFRleHQ= U2F2ZSBVc2VybmFtZSBvbiBUaGlzIENvbXB1dGVy U2VhcmNo Index: install/install_data.sql =================================================================== --- install/install_data.sql (revision 13756) +++ install/install_data.sql (working copy) @@ -7,15 +7,14 @@ INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Perpage_Category_Short', '3', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_perpage__short_prompt', 'text', '', '', 10.04, 0, 1, NULL); INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_DaysNew', '8', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_daysnew_prompt', 'text', '', '', 10.05, 0, 1, NULL); INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_ShowPick', '', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_showpick_prompt', 'checkbox', '', '', 10.06, 0, 1, NULL); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Root_Name', 'lu_rootcategory_name', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_prompt_root_name', 'text', '', '', 10.07, 0, 1, NULL); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MaxImportCategoryLevels', '10', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_prompt_max_import_category_levels', 'text', '', '', 10.08, 0, 1, NULL); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'AllowDeleteRootCats', '1', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_AllowDeleteRootCats', 'checkbox', NULL, NULL, 10.09, 0, 0, NULL); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Catalog_PreselectModuleTab', '1', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_CatalogPreselectModuleTab', 'checkbox', NULL, NULL, 10.1, 0, 0, NULL); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'RecycleBinFolder', '', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_RecycleBinFolder', 'text', NULL, NULL, 10.11, 0, 0, NULL); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'QuickCategoryPermissionRebuild', '1', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_QuickCategoryPermissionRebuild', 'checkbox', NULL, NULL, 10.12, 0, 0, NULL); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'FilenameSpecialCharReplacement', '-', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_FilenameSpecialCharReplacement', 'select', NULL, '_=+_||-=+-', 10.13, 0, 0, NULL); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'YahooApplicationId', '', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_YahooApplicationId', 'text', NULL, NULL, 10.14, 0, 0, NULL); -INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Search_MinKeyword_Length', '3', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_Search_MinKeyword_Length', 'text', NULL, NULL, 10.15, 0, 0, NULL); +INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MaxImportCategoryLevels', '10', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_prompt_max_import_category_levels', 'text', '', '', 10.07, 0, 1, NULL); +INSERT INTO ConfigurationValues VALUES(DEFAULT, 'AllowDeleteRootCats', '1', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_AllowDeleteRootCats', 'checkbox', NULL, NULL, 10.08, 0, 0, NULL); +INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Catalog_PreselectModuleTab', '1', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_CatalogPreselectModuleTab', 'checkbox', NULL, NULL, 10.09, 0, 0, NULL); +INSERT INTO ConfigurationValues VALUES(DEFAULT, 'RecycleBinFolder', '', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_RecycleBinFolder', 'text', NULL, NULL, 10.10, 0, 0, NULL); +INSERT INTO ConfigurationValues VALUES(DEFAULT, 'QuickCategoryPermissionRebuild', '1', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_QuickCategoryPermissionRebuild', 'checkbox', NULL, NULL, 10.11, 0, 0, NULL); +INSERT INTO ConfigurationValues VALUES(DEFAULT, 'FilenameSpecialCharReplacement', '-', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_FilenameSpecialCharReplacement', 'select', NULL, '_=+_||-=+-', 10.12, 0, 0, NULL); +INSERT INTO ConfigurationValues VALUES(DEFAULT, 'YahooApplicationId', '', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_YahooApplicationId', 'text', NULL, NULL, 10.13, 0, 0, NULL); +INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Search_MinKeyword_Length', '3', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_Search_MinKeyword_Length', 'text', NULL, NULL, 10.14, 0, 0, NULL); INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_MetaKey', '', 'In-Portal', 'in-portal:configure_categories', 'la_Text_MetaInfo', 'la_category_metakey', 'textarea', '', '', 20.01, 0, 1, NULL); INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_MetaDesc', '', 'In-Portal', 'in-portal:configure_categories', 'la_Text_MetaInfo', 'la_category_metadesc', 'textarea', '', '', 20.02, 0, 1, NULL); Index: install/upgrades.sql =================================================================== --- install/upgrades.sql (revision 13758) +++ install/upgrades.sql (working copy) @@ -1901,4 +1901,10 @@ # ===== v 5.1.0-B2 ===== -# ===== v 5.1.0-RC1 ===== \ No newline at end of file +# ===== v 5.1.0-RC1 ===== +DELETE FROM ConfigurationValues WHERE VariableName = 'Root_Name'; +DELETE FROM Phrase WHERE PhraseKey = 'LA_PROMPT_ROOT_NAME'; + +UPDATE ConfigurationValues +SET DisplayOrder = DisplayOrder - 0.01 +WHERE ModuleOwner = 'In-Portal' AND `Section` = 'in-portal:configure_categories' AND DisplayOrder > 10.07; \ No newline at end of file Index: kernel/db/cat_tag_processor.php =================================================================== --- kernel/db/cat_tag_processor.php (revision 13756) +++ kernel/db/cat_tag_processor.php (working copy) @@ -244,13 +244,7 @@ $object =& $this->getObject($params); $category_id = isset($params['cat_id']) ? $params['cat_id'] : $object->GetDBField('CategoryId'); - $cache_key = 'category_paths[%CIDSerial:' . $category_id . '%]'; - - if ($category_id == 0) { - // home category name is phrase AND phrase name is defined in configuration - $cache_key .= '[%PhrasesSerial%][%ConfSerial%]'; - } - + $cache_key = 'category_paths[%CIDSerial:' . $category_id . '%][%PhrasesSerial%][Adm:' . (int)$this->Application->isAdmin . ']'; $category_path = $this->Application->getCache($cache_key); if ($category_path === false) { @@ -260,7 +254,7 @@ $category_path = trim($this->CategoryName( Array('cat_id' => 0) ).' > '.str_replace('&|&', ' > ', $cached_navbar), ' > '); } else { - $category_path = $this->Application->Phrase( $this->Application->ConfigValue('Root_Name') ); + $category_path = $this->Application->Phrase(($this->Application->isAdmin ? 'la_' : 'lu_') . 'rootcategory_name'); } $this->Application->setCache($cache_key, $category_path); Index: kernel/processors/main_processor.php =================================================================== --- kernel/processors/main_processor.php (revision 13756) +++ kernel/processors/main_processor.php (working copy) @@ -945,12 +945,18 @@ } } + /** + * Returns Home category name + * + * @param Array $params + * @return string + * @deprecated + */ function RootCategoryName($params) { - $phrase_name = $this->Application->ConfigValue('Root_Name'); $no_editing = array_key_exists('no_editing', $params) && $params['no_editing']; - return $this->Application->Phrase($phrase_name, !$no_editing); + return $this->Application->Phrase('la_rootcategory_name', !$no_editing); } /** Index: units/categories/categories_item.php =================================================================== --- units/categories/categories_item.php (revision 13756) +++ units/categories/categories_item.php (working copy) @@ -213,7 +213,7 @@ { if ($this->IsRoot() && $this->Prefix == 'c') { $title_field = $this->Application->getUnitOption($this->Prefix, 'TitleField'); - $category_name = $this->Application->Phrase( $this->Application->ConfigValue('Root_Name') ); + $category_name = $this->Application->Phrase(($this->Application->isAdmin ? 'la_' : 'lu_') . 'rootcategory_name'); $this->SetDBField($title_field, $category_name); return false; } Index: units/categories/categories_tag_processor.php =================================================================== --- units/categories/categories_tag_processor.php (revision 13756) +++ units/categories/categories_tag_processor.php (working copy) @@ -114,7 +114,7 @@ return $icon_prefix . 'section.png'; } - + function ItemCount($params) { $object =& $this->getObject($params); @@ -1024,13 +1024,7 @@ $object =& $this->getObject($params); $category_id = isset($params['cat_id']) ? $params['cat_id'] : $object->GetDBField('CategoryId'); - $cache_key = 'category_paths[%CIDSerial:' . $category_id . '%]'; - - if ($category_id == 0) { - // home category name is phrase AND phrase name is defined in configuration - $cache_key .= '[%PhrasesSerial%][%ConfSerial%]'; - } - + $cache_key = 'category_paths[%CIDSerial:' . $category_id . '%][%PhrasesSerial%][Adm:' . (int)$this->Application->isAdmin . ']'; $category_path = $this->Application->getCache($cache_key); if ($category_path === false) { @@ -1062,7 +1056,7 @@ $category_path = trim($this->CategoryName( Array('cat_id' => 0) ).' > '.str_replace('&|&', ' > ', $cached_navbar), ' > '); } else { - $category_path = $this->Application->Phrase( $this->Application->ConfigValue('Root_Name') ); + $category_path = $this->Application->Phrase(($this->Application->isAdmin ? 'la_' : 'lu_') . 'rootcategory_name'); } $this->Application->setCache($cache_key, $category_path); Index: units/category_items/category_items_tag_processor.php =================================================================== --- units/category_items/category_items_tag_processor.php (revision 13756) +++ units/category_items/category_items_tag_processor.php (working copy) @@ -23,7 +23,7 @@ $object =& $this->getObject($params); /* @var $object kDBList */ - $root_phrase = $this->Application->Phrase( $this->Application->ConfigValue('Root_Name') ); + $root_phrase = $this->Application->Phrase(($this->Application->isAdmin ? 'la_' : 'lu_') . 'rootcategory_name'); $cached_navbar = preg_replace('/^(Content&\|&|Content)/i', '', $object->GetDBField($field)); $value = str_replace('&|&', ' > ', $cached_navbar); Index: units/permissions/permissions_tag_processor.php =================================================================== --- units/permissions/permissions_tag_processor.php (revision 13756) +++ units/permissions/permissions_tag_processor.php (working copy) @@ -182,13 +182,7 @@ function CategoryPath($params) { $category_id = $params['cat_id']; - $cache_key = 'category_paths[%CIDSerial:' . $category_id . '%]'; - - if ("$category_id" == '0') { - // home category name is phrase AND phrase name is defined in configuration - $cache_key .= '[%PhrasesSerial%][%ConfSerial%]'; - } - + $cache_key = 'category_paths[%CIDSerial:' . $category_id . '%][%PhrasesSerial%][Adm:' . (int)$this->Application->isAdmin . ']'; $category_path = $this->Application->getCache($cache_key); if ($category_path === false) { @@ -205,7 +199,7 @@ $category_path = trim($this->CategoryPath( Array('cat_id' => 0) ).' > '.str_replace('&|&', ' > ', $cached_navbar), ' > '); } else { - $category_path = $this->Application->Phrase( $this->Application->ConfigValue('Root_Name') ); + $category_path = $this->Application->Phrase(($this->Application->isAdmin ? 'la_' : 'lu_') . 'rootcategory_name'); } $this->Application->setCache($cache_key, $category_path);