Index: branches/5.2.x/core/units/categories/categories_config.php =================================================================== diff -u -N -r13840 -r14092 --- branches/5.2.x/core/units/categories/categories_config.php (.../categories_config.php) (revision 13840) +++ branches/5.2.x/core/units/categories/categories_config.php (.../categories_config.php) (revision 14092) @@ -1,6 +1,6 @@ Array ( - 'prefixes' => Array ('c', 'g_List'), 'format' => "#c_status# '#c_titlefield#' - !la_title_Permissions!", + 'prefixes' => Array ('c'), 'format' => "#c_status# '#c_titlefield#' - !la_title_Permissions!", 'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'), ), @@ -252,15 +252,10 @@ 'FilterMenu' => Array ( 'Groups' => Array ( - Array ('mode' => 'AND', 'filters' => Array ('show_active', 'show_pending', 'show_disabled'), 'type' => WHERE_FILTER), Array ('mode' => 'AND', 'filters' => Array ('show_new'), 'type' => HAVING_FILTER), Array ('mode' => 'AND', 'filters' => Array ('show_pick'), 'type' => WHERE_FILTER), ), 'Filters' => Array ( - 'show_active' => Array ('label' =>'la_Active', 'on_sql' => '', 'off_sql' => 'Status != 1'), - 'show_pending' => Array ('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => 'Status != 2'), - 'show_disabled' => Array ('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => 'Status != 0'), - 's1' => Array (), 'show_new' => Array ('label' => 'la_Text_New', 'on_sql' => '', 'off_sql' => '`IsNew` != 1'), 'show_pick' => Array ('label' => 'la_prompt_EditorsPick', 'on_sql' => '', 'off_sql' => '`EditorsPick` != 1'), ) @@ -295,7 +290,6 @@ 'LocalImage' => 'img.LocalImage', 'LocalPath' => 'img.LocalPath', 'FullUrl' => 'img.Url', - 'CreatedBySystem' => 'IF(ThemeId != 0, 1, 0)', ), '-virtual' => Array (), ), @@ -304,7 +298,11 @@ 'Fields' => Array ( 'CategoryId' => Array ('type' => 'int', 'not_null' => 1,'default' => 0), - 'Type' => Array ('type' => 'int', 'not_null' => 1,'default' => 0), + 'Type' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Virtual', 2 => 'la_opt_Template'), 'use_phrases' => 1, + 'not_null' => 1,'default' => 1 + ), 'SymLinkCategoryId' => Array ('type' => 'int', 'default' => NULL), 'ParentId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'not_null' => 1,'default' => 0, 'required' => 1), 'Name' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'not_null' => 1, 'required' => 1, 'default' => ''), @@ -326,9 +324,9 @@ 'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled' ), 'use_phrases' => 1, 'not_null' => 1,'default' => 1), 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => 0), 'MetaKeywords' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null), - 'CachedDescendantCatsQty' => Array ('type' => 'int', 'default' => 0), + 'CachedDescendantCatsQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), 'CachedNavbar' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'default' => null), - 'CreatedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1,'default' => 0), + 'CreatedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'default' => NULL), 'ResourceId' => Array ('type' => 'int', 'default' => null), 'ParentPath' => Array ('type' => 'string', 'default' => null), 'TreeLeft' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), @@ -339,7 +337,7 @@ 'NewItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2), 'PopItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2), 'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), - 'ModifiedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1,'default' => 0), + 'ModifiedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'default' => NULL), 'CachedTemplate' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), @@ -379,7 +377,7 @@ 'MetaTitle' => Array ('type' => 'string', 'default' => null), 'IndexTools' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null), 'IsMenu' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Show', 0 => 'la_Hide'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1), - 'IsSystem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_System', 0 => 'la_text_User'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), + 'Protected' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), 'FormId' => Array ( 'type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ('' => ''), @@ -419,12 +417,11 @@ 'LocalImage' => Array('type' => 'string', 'default' => ''), 'LocalPath' => Array('type' => 'string', 'default' => ''), 'FullUrl' => Array('type' => 'string', 'default' => ''), - 'CreatedBySystem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_System', 0 => 'la_text_User'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), ), 'Grids' => Array( 'Default' => Array ( - 'Icons' => Array( // 'StatusField' => Array ('IsSystem', 'Status', 'IsMenu'), // 'Status' + 'Icons' => Array( // 'StatusField' => Array ('Type', 'Status', 'IsMenu'), // 'Status' 'default' => 'icon_section.png', '1_0_0' => 'icon16_section_system.png', // system '1_0_1' => 'icon16_section_system.png', // system @@ -443,14 +440,16 @@ 'Modified' => Array( 'title'=>'la_col_Modified', 'filter_block' => 'grid_date_range_filter', 'width' => 170), 'Template' => Array( 'title'=>'la_col_TemplateType', 'filter_block' => 'grid_options_filter', 'width' => 220), 'IsMenu' => Array( 'title'=>'la_col_InMenu', 'filter_block' => 'grid_options_filter', 'width' => 70), - 'CreatedBySystem' => Array( 'title'=>'la_col_System', 'filter_block' => 'grid_options_filter', 'width' => 100), + 'Type' => Array( 'title'=>'la_col_Type', 'filter_block' => 'grid_options_filter', 'width' => 100), + 'Status' => Array( 'title'=>'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 100), + 'Protected' => Array( 'title'=>'la_col_Protected', 'filter_block' => 'grid_options_filter', 'width' => 100), ), ), 'Radio' => Array ( 'Selector' => 'radio', - 'Icons' => Array( // 'StatusField' => Array ('IsSystem', 'Status', 'IsMenu'), // 'Status' + 'Icons' => Array( // 'StatusField' => Array ('Type', 'Status', 'IsMenu'), // 'Status' 'default' => 'icon_section.png', '1_0_0' => 'icon16_section_system.png', // system '1_0_1' => 'icon16_section_system.png', // system @@ -469,13 +468,15 @@ 'IsMenu' => Array( 'title'=>'la_col_InMenu', 'filter_block' => 'grid_options_filter', 'width' => 70), 'Modified' => Array( 'title'=>'la_col_Modified', 'filter_block' => 'grid_date_range_filter', 'width' => 170), 'Template' => Array( 'title'=>'la_col_TemplateType', 'filter_block' => 'grid_options_filter', 'width' => 220), - 'CreatedBySystem' => Array( 'title'=>'la_col_System', 'filter_block' => 'grid_options_filter', 'width' => 100), + 'Type' => Array( 'title'=>'la_col_Type', 'filter_block' => 'grid_options_filter', 'width' => 100), + 'Status' => Array( 'title'=>'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 100), + 'Protected' => Array( 'title'=>'la_col_Protected', 'filter_block' => 'grid_options_filter', 'width' => 100), ), ), 'Structure' => Array ( - 'Icons' => Array( // 'StatusField' => Array ('IsSystem', 'Status', 'IsMenu'), // 'Status' + 'Icons' => Array( // 'StatusField' => Array ('Type', 'Status', 'IsMenu'), // 'Status' 'default' => 'icon_section.png', '1_0_0' => 'icon16_section_system.png', // system '1_0_1' => 'icon16_section_system.png', // system @@ -495,7 +496,9 @@ 'Path' => Array( 'title'=>'la_col_Path', 'data_block' => 'page_entercat_td', 'filter_block' => 'grid_like_filter'), 'Modified' => Array( 'title'=>'la_col_Modified', 'filter_block' => 'grid_date_range_filter', 'width' => 170), 'Template' => Array( 'title'=>'la_col_TemplateType', 'filter_block' => 'grid_options_filter', 'width' => 220), - 'CreatedBySystem' => Array( 'title'=>'la_col_System', 'filter_block' => 'grid_options_filter', 'width' => 100), + 'Type' => Array( 'title'=>'la_col_Type', 'filter_block' => 'grid_options_filter', 'width' => 100), + 'Status' => Array( 'title'=>'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 100), + 'Protected' => Array( 'title'=>'la_col_Protected', 'filter_block' => 'grid_options_filter', 'width' => 100), ), ),