Index: branches/5.1.x/install/upgrades.sql =================================================================== diff -u -N -r13184 -r13548 --- branches/5.1.x/install/upgrades.sql (.../upgrades.sql) (revision 13184) +++ branches/5.1.x/install/upgrades.sql (.../upgrades.sql) (revision 13548) @@ -169,6 +169,14 @@ # ===== v 5.0.2 ===== +# ===== v 5.0.3-B1 ===== + +# ===== v 5.0.3-B2 ===== + +# ===== v 5.0.3-RC1 ===== + +# ===== v 5.0.3 ===== + # ===== v 5.1.0-B1 ===== UPDATE Modules SET Path = 'modules/in-bulletin/' WHERE `Name` = 'In-Bulletin'; DELETE FROM ConfigurationValues WHERE VariableName IN ( Index: branches/5.1.x/admin_templates/polls/poll_edit_comments.tpl =================================================================== diff -u -N -r13094 -r13548 --- branches/5.1.x/admin_templates/polls/poll_edit_comments.tpl (.../poll_edit_comments.tpl) (revision 13094) +++ branches/5.1.x/admin_templates/polls/poll_edit_comments.tpl (.../poll_edit_comments.tpl) (revision 13548) @@ -144,7 +144,7 @@ - + Index: branches/5.1.x/units/topics/topics_config.php =================================================================== diff -u -N -r13155 -r13548 --- branches/5.1.x/units/topics/topics_config.php (.../topics_config.php) (revision 13155) +++ branches/5.1.x/units/topics/topics_config.php (.../topics_config.php) (revision 13548) @@ -1,6 +1,6 @@ 'bb', - 'ItemClass' => Array('class' => 'kCatDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array('class' => 'kCatDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array('class' => 'TopicsEventHandler', 'file' => 'topics_event_handler.php', 'require_classes' => Array('kCatDBEventHandler'), 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array('class' => 'TopicsTagProcessor', 'file' => 'topics_tag_processor.php', 'require_classes' => Array('kCatDBTagProcessor'), 'build_event' => 'OnBuild'), + 'ItemClass' => Array ('class' => 'kCatDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kCatDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'TopicsEventHandler', 'file' => 'topics_event_handler.php', 'require_classes' => Array ('kCatDBEventHandler'), 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'TopicsTagProcessor', 'file' => 'topics_tag_processor.php', 'require_classes' => Array ('kCatDBTagProcessor'), 'build_event' => 'OnBuild'), 'AutoLoad' => true, - 'QueryString' => Array( + 'QueryString' => Array ( 1 => 'id', 2 => 'Page', 3 => 'PerPage', @@ -40,11 +40,66 @@ 'Conditional' => false, 'HookToPrefix' => '', 'HookToSpecial' => '*', - 'HookToEvent' => Array('OnAfterConfigRead'), + 'HookToEvent' => Array ('OnAfterConfigRead'), 'DoPrefix' => 'cdata', 'DoSpecial' => '*', 'DoEvent' => 'OnDefineCustomFields', ), + + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => 'rev', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ('OnAfterConfigRead'), + 'DoPrefix' => '', + 'DoSpecial' => '*', + 'DoEvent' => 'OnCloneSubItem', + ), + + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => 'fav', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ('OnAfterConfigRead'), + 'DoPrefix' => '', + 'DoSpecial' => '*', + 'DoEvent' => 'OnCloneSubItem', + ), + + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => 'rel', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ('OnAfterConfigRead'), + 'DoPrefix' => '', + 'DoSpecial' => '*', + 'DoEvent' => 'OnCloneSubItem', + ), + + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => 'img', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ('OnAfterConfigRead'), + 'DoPrefix' => '', + 'DoSpecial' => '*', + 'DoEvent' => 'OnCloneSubItem', + ), + + Array ( + 'Mode' => hBEFORE, + 'Conditional' => false, + 'HookToPrefix' => 'ci', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ('OnAfterConfigRead'), + 'DoPrefix' => '', + 'DoSpecial' => '*', + 'DoEvent' => 'OnCloneSubItem', + ), ), 'CatalogItem' => true, @@ -53,45 +108,45 @@ 'SearchConfigPostfix' => 'topics', 'IDField' => 'TopicId', - 'StatusField' => Array('Status'), // field, that is affected by Approve/Decline events + 'StatusField' => Array ('Status'), // field, that is affected by Approve/Decline events 'TitleField' => 'TopicText', // field, used in bluebar when editing existing item 'TitlePhrase' => 'la_Text_Topic', // phrase used to specify item type in relationship list 'OwnerField' => 'OwnerId', // usually it is CreatedById - 'TitlePresets' => Array( - 'default' => Array( 'new_status_labels' => Array('bb' => '!la_title_AddingTopic!'), - 'edit_status_labels' => Array('bb' => '!la_title_EditingTopic!'), - 'new_titlefield' => Array('bb' => '!la_title_NewTopic!'), + 'TitlePresets' => Array ( + 'default' => Array ( 'new_status_labels' => Array ('bb' => '!la_title_AddingTopic!'), + 'edit_status_labels' => Array ('bb' => '!la_title_EditingTopic!'), + 'new_titlefield' => Array ('bb' => '!la_title_NewTopic!'), ), - 'topics_edit' => Array('prefixes' => Array('bb'), 'format' => "#bb_status# '#bb_titlefield#' - !la_title_General!"), - 'topics_categories' => Array('prefixes' => Array('bb','bb-ci_List'), 'format' => "#bb_status# '#bb_titlefield#' - !la_title_Categories!"), - 'topics_relations' => Array('prefixes' => Array('bb'), 'format' => "#bb_status# '#bb_titlefield#' - !la_title_Relations!"), - 'topics_images' => Array('prefixes' => Array('bb'), 'format' => "#bb_status# '#bb_titlefield#' - !la_title_Images!"), - 'topics_reviews' => Array('prefixes' => Array('bb'), 'format' => "#bb_status# '#bb_titlefield#' - !la_title_Reviews!"), - 'topics_custom' => Array('prefixes' => Array('bb'), 'format' => "#bb_status# '#bb_titlefield#' - !la_title_Custom!"), + 'topics_edit' => Array ('prefixes' => Array ('bb'), 'format' => "#bb_status# '#bb_titlefield#' - !la_title_General!"), + 'topics_categories' => Array ('prefixes' => Array ('bb', 'bb-ci_List'), 'format' => "#bb_status# '#bb_titlefield#' - !la_title_Categories!"), + 'topics_relations' => Array ('prefixes' => Array ('bb'), 'format' => "#bb_status# '#bb_titlefield#' - !la_title_Relations!"), + 'topics_images' => Array ('prefixes' => Array ('bb'), 'format' => "#bb_status# '#bb_titlefield#' - !la_title_Images!"), + 'topics_reviews' => Array ('prefixes' => Array ('bb'), 'format' => "#bb_status# '#bb_titlefield#' - !la_title_Reviews!"), + 'topics_custom' => Array ('prefixes' => Array ('bb'), 'format' => "#bb_status# '#bb_titlefield#' - !la_title_Custom!"), - 'images_edit' => Array( 'prefixes' => Array('bb', 'bb-img'), - 'new_status_labels' => Array('bb-img'=>'!la_title_Adding_Image!'), - 'edit_status_labels' => Array('bb-img'=>'!la_title_Editing_Image!'), - 'new_titlefield' => Array('bb-img'=>'!la_title_New_Image!'), + 'images_edit' => Array ( 'prefixes' => Array ('bb', 'bb-img'), + 'new_status_labels' => Array ('bb-img' => '!la_title_Adding_Image!'), + 'edit_status_labels' => Array ('bb-img' => '!la_title_Editing_Image!'), + 'new_titlefield' => Array ('bb-img' => '!la_title_New_Image!'), 'format' => "#bb_status# '#bb_titlefield#' - #bb-img_status# '#bb-img_titlefield#'", ), - 'reviews_edit' => Array( 'prefixes' => Array('bb', 'bb-rev'), - 'new_status_labels' => Array('bb-rev'=>"!la_title_Adding_Review! '!la_title_New_Review!'"), - 'edit_status_labels' => Array('bb-rev'=>'!la_title_Editing_Review!'), + 'reviews_edit' => Array ( 'prefixes' => Array ('bb', 'bb-rev'), + 'new_status_labels' => Array ('bb-rev' =>"!la_title_Adding_Review! '!la_title_New_Review!'"), + 'edit_status_labels' => Array ('bb-rev' => '!la_title_Editing_Review!'), 'format' => "#bb_status# '#bb_titlefield#' - #bb-rev_status#", ), - 'relations_edit' => Array( 'prefixes' => Array('bb', 'bb-rel'), - 'new_status_labels' => Array('bb-rel'=>"!la_title_Adding_Relationship! '!la_title_New_Relationship!'"), - 'edit_status_labels' => Array('bb-rel'=>'!la_title_Editing_Relationship!'), + 'relations_edit' => Array ( 'prefixes' => Array ('bb', 'bb-rel'), + 'new_status_labels' => Array ('bb-rel' =>"!la_title_Adding_Relationship! '!la_title_New_Relationship!'"), + 'edit_status_labels' => Array ('bb-rel' => '!la_title_Editing_Relationship!'), 'format' => "#bb_status# '#bb_titlefield#' - #bb-rel_status#", ), - 'tree_in-bulletin' => Array('format' => '!la_Text_Version! '.$this->Application->findModule('Name', 'In-Bulletin', 'Version')), + 'tree_in-bulletin' => Array ('format' => '!la_Text_Version! '.$this->Application->findModule('Name', 'In-Bulletin', 'Version')), ), 'EditTabPresets' => Array ( @@ -108,27 +163,27 @@ 'PermItemPrefix' => 'TOPIC', 'PermTabText' => 'In-Bulletin', - 'PermSection' => Array('main' => 'CATEGORY:in-bulletin:topics_list', 'search' => 'in-bulletin:configuration_search', 'email' => 'in-bulletin:configuration_email', 'custom' => 'in-bulletin:configuration_custom'), + 'PermSection' => Array ('main' => 'CATEGORY:in-bulletin:topics_list', 'search' => 'in-bulletin:configuration_search', 'email' => 'in-bulletin:configuration_email', 'custom' => 'in-bulletin:configuration_custom'), - 'Sections' => Array( - /*'in-bulletin' => Array( + 'Sections' => Array ( + /*'in-bulletin' => Array ( 'parent' => 'in-portal:root', 'icon' => 'settings_in-bulletin', 'label' => 'la_title_In-Bulletin', - 'url' => Array('t' => 'index', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view'), + 'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'), + 'permissions' => Array ('view'), 'priority' => 3.3, 'container' => true, 'type' => stTREE, ),*/ - 'in-bulletin:topics' => Array( + 'in-bulletin:topics' => Array ( 'parent' => 'in-portal:site', 'icon' => 'topics', 'label' => 'la_tab_Topics', - 'url' => Array('t' => 'catalog/advanced_view', 'anchor' => 'tab-bb.showall', 'pass' => 'm'), + 'url' => Array ('t' => 'catalog/advanced_view', 'anchor' => 'tab-bb.showall', 'pass' => 'm'), 'onclick' => 'setCatalogTab(\'bb.showall\')', - 'permissions' => Array('view'), + 'permissions' => Array ('view'), 'priority' => 3.4, 'type' => stTREE, ), @@ -146,81 +201,81 @@ 'type' => stTREE, ), - /*'in-bulletin:inbulletin_general' => Array( + /*'in-bulletin:inbulletin_general' => Array ( 'parent' => 'in-bulletin:setting_folder', 'icon' => 'core:settings_general', 'label' => 'la_tab_GeneralSettings', - 'url' => Array('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), + 'url' => Array ('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'), + 'permissions' => Array ('view', 'edit'), 'priority' => 2.9, 'type' => stTREE, ),*/ - 'in-bulletin:configuration_output' => Array( + 'in-bulletin:configuration_output' => Array ( 'parent' => 'in-bulletin:setting_folder', 'icon' => 'core:conf_output', 'label' => 'la_tab_ConfigOutput', - 'url' => Array('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), + 'url' => Array ('t' => 'config/config_general', 'pass_section' => true, 'pass' => 'm'), + 'permissions' => Array ('view', 'edit'), 'priority' => 3, 'type' => stTREE, ), - 'in-bulletin:configuration_search' => Array( + 'in-bulletin:configuration_search' => Array ( 'parent' => 'in-bulletin:setting_folder', 'icon' => 'core:conf_search', 'label' => 'la_tab_ConfigSearch', - 'url' => Array('t' => 'config/config_search', 'module_key' => 'topics', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), + 'url' => Array ('t' => 'config/config_search', 'module_key' => 'topics', 'pass_section' => true, 'pass' => 'm'), + 'permissions' => Array ('view', 'edit'), 'priority' => 4, 'type' => stTREE, ), - 'in-bulletin:configuration_email' => Array( + 'in-bulletin:configuration_email' => Array ( 'parent' => 'in-bulletin:setting_folder', 'icon' => 'core:conf_email', 'label' => 'la_tab_ConfigE-mail', - 'url' => Array('t' => 'config/config_email', 'pass_section' => true, 'pass' => 'm'), - 'permissions' => Array('view', 'edit'), + 'url' => Array ('t' => 'config/config_email', 'pass_section' => true, 'pass' => 'm'), + 'permissions' => Array ('view', 'edit'), 'priority' => 5, 'type' => stTREE, ), - 'in-bulletin:configuration_custom' => Array( + 'in-bulletin:configuration_custom' => Array ( 'parent' => 'in-bulletin:setting_folder', 'icon' => 'core:conf_customfields', 'label' => 'la_tab_ConfigCustom', - 'url' => Array('t' => 'custom_fields/custom_fields_list', 'cf_type' => 3, 'pass_section' => true, 'pass' => 'm,cf'), - 'permissions' => Array('view', 'add', 'edit', 'delete'), + 'url' => Array ('t' => 'custom_fields/custom_fields_list', 'cf_type' => 3, 'pass_section' => true, 'pass' => 'm,cf'), + 'permissions' => Array ('view', 'add', 'edit', 'delete'), 'priority' => 6, 'type' => stTREE, ), ), - '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_hot'), 'type' => HAVING_FILTER), - Array('mode' => 'AND', 'filters' => Array('show_pop'), 'type' => HAVING_FILTER), - Array('mode' => 'AND', 'filters' => Array('show_pick'), 'type' => WHERE_FILTER), + '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_hot'), 'type' => HAVING_FILTER), + Array ('mode' => 'AND', 'filters' => Array ('show_pop'), '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' => '%1$s.Status != 1' ), - 'show_pending' => Array('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2' ), - 'show_disabled' => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ), - 's1' => Array(), - 'show_new' => Array('label' => 'la_Text_New', 'on_sql' => '', 'off_sql' => '`IsNew` != 1' ), - 'show_hot' => Array('label' => 'la_Text_Hot', 'on_sql' => '', 'off_sql' => '`IsHot` != 1' ), - 'show_pop' => Array('label' => 'la_Text_Pop', 'on_sql' => '', 'off_sql' => '`IsPop` != 1' ), - 'show_pick' => Array('label' => 'la_prompt_EditorsPick', 'on_sql' => '', 'off_sql' => '%1$s.`EditorsPick` != 1' ), + 'Filters' => Array ( + 'show_active' => Array ('label' => 'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ), + 'show_pending' => Array ('label' => 'la_Pending', 'on_sql' => '', 'off_sql' => '%1$s.Status != 2' ), + 'show_disabled' => Array ('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ), + 's1' => Array (), + 'show_new' => Array ('label' => 'la_Text_New', 'on_sql' => '', 'off_sql' => '`IsNew` != 1' ), + 'show_hot' => Array ('label' => 'la_Text_Hot', 'on_sql' => '', 'off_sql' => '`IsHot` != 1' ), + 'show_pop' => Array ('label' => 'la_Text_Pop', 'on_sql' => '', 'off_sql' => '`IsPop` != 1' ), + 'show_pick' => Array ('label' => 'la_prompt_EditorsPick', 'on_sql' => '', 'off_sql' => '%1$s.`EditorsPick` != 1' ), ) ), 'CatalogSelectorName' => 'topiclist', - 'ItemPropertyMappings' => Array( + 'ItemPropertyMappings' => Array ( 'NewDays' => 'Topic_NewDays', // number of days item to be NEW 'MinPopVotes' => 'Topic_MinPopVotes', // minimum number of votes for an item to be POP 'MinPopRating' => 'Topic_MinPopRating', // minimum rating for an item to be POP @@ -236,12 +291,12 @@ 'CatalogTabIcon' => 'in-bulletin:icon16_topics.png', 'UsePendingEditing' => true, // item editing is controlled by TOPIC.ADD/EDIT, TOPIC.ADD/EDIT.PENDING permissions - 'StatisticsInfo' => Array( - 'pending' => Array( + 'StatisticsInfo' => Array ( + 'pending' => Array ( 'icon' => 'icon16_topic_pending.gif', 'label' => 'la_Text_Topics', 'js_url' => '#url#', - 'url' => Array('t' => 'catalog/advanced_view', 'SetTab' => 'bb', 'pass' => 'm,bb.showall', 'bb.showall_event' => 'OnSetFilterPattern', 'bb.showall_filters' => 'show_active=0,show_pending=1,show_disabled=0,show_new=1,show_hot=1,show_pop=1,show_pick=1'), + 'url' => Array ('t' => 'catalog/advanced_view', 'SetTab' => 'bb', 'pass' => 'm,bb.showall', 'bb.showall_event' => 'OnSetFilterPattern', 'bb.showall_filters' => 'show_active=0,show_pending=1,show_disabled=0,show_new=1,show_hot=1,show_pop=1,show_pick=1'), 'status' => STATUS_PENDING, ), ), @@ -256,6 +311,7 @@ 'PrimaryCat' => TABLE_PREFIX.'%3$sCategoryItems.PrimaryCat', 'ParentPath' => TABLE_PREFIX.'Category.ParentPath', + 'AltName' => 'img.AltName', 'SameImages' => 'img.SameImages', 'LocalThumb' => 'img.LocalThumb', 'ThumbPath' => 'img.ThumbPath', @@ -269,7 +325,7 @@ ), ), - 'ListSQLs' => Array( ''=>' SELECT %1$s.* %2$s + 'ListSQLs' => Array ( '' => ' SELECT %1$s.* %2$s FROM %1$s LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId @@ -280,13 +336,13 @@ LEFT JOIN '.TABLE_PREFIX.'%3$sTopicCustomData cust ON %1$s.ResourceId = cust.ResourceId', ), // key - special, value - list select sql - 'ListSortings' => Array( - '' => Array( - 'ForcedSorting' => Array('Priority' => 'desc'), - 'Sorting' => Array('TopicText' => 'asc'), + 'ListSortings' => Array ( + '' => Array ( + 'ForcedSorting' => Array ('Priority' => 'desc'), + 'Sorting' => Array ('TopicText' => 'asc'), ) ), - 'ItemSQLs' => Array( ''=>' SELECT %1$s.* %2$s + 'ItemSQLs' => Array ( '' => ' SELECT %1$s.* %2$s FROM %1$s LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryItems ON '.TABLE_PREFIX.'%3$sCategoryItems.ItemResourceId = %1$s.ResourceId LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'%3$sCategoryItems.CategoryId @@ -295,106 +351,215 @@ LEFT JOIN '.TABLE_PREFIX.'Posting last_post ON last_post.PostingId = %1$s.LastPostId LEFT JOIN '.TABLE_PREFIX.'%3$sTopicCustomData cust ON %1$s.ResourceId = cust.ResourceId'), - 'SubItems' => Array('bb-rev', 'bb-ci', 'bb-rel', 'bb-img', 'bb-cdata', 'bb-fav', 'bb-post'), + 'SubItems' => Array ('bb-rev', 'bb-ci', 'bb-rel', 'bb-img', 'bb-cdata', 'bb-fav', 'bb-post'), 'Fields' => Array ( - 'TopicId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,), - 'NotifyOwnerOnChanges' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'lu_No', 1 => 'lu_Yes'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'Modified' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#'), - 'TopicText' => Array('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''), - 'AutomaticFilename' => Array('type' => 'int', 'not_null' => 1, 'default' => 1), - 'Posts' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Views' => Array('type' => 'double', 'formatter' => 'kFormatter', 'format' => '%d', 'not_null' => 1, 'default' => 0), - 'EditorsPick' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0), - 'Status' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2), - 'Priority' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'OwnerId' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array(-1 => 'root', -2 => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'not_null' => 1, 'required' => 1, 'default' => -1), - 'ModifiedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array(-1 => 'root', -2 => '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), - 'ResourceId' => Array('type' => 'int', 'default' => null), - 'TopicType' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(0 => 'la_Yes', 1 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1), - 'CreatedOn' => Array('type' => 'double', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#'), - 'CachedReviewsQty' => Array('type' => 'int' ,'not_null' => 1, 'default' => 0), - 'CachedRating' => Array('type' => 'string', 'not_null' => 1, 'default' => 0), - 'CachedVotesQty' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - '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), - 'HotItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1,'default' => 2), - 'PostedBy' => Array('type' => 'string', 'not_null' => 1, 'default' => ''), - 'OrgId' => Array('type' => 'int', 'default' => null), - 'LastPostId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'LastPostDate' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null), - 'TodayDate' => Array('type' => 'string', 'default' => null), - 'TodayPosts' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'MetaKeywords' => Array('type' => 'string', 'default' => null), - 'MetaDescription' => Array('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null), - ), + 'TopicId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), + 'NotifyOwnerOnChanges' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'lu_No', 1 => 'lu_Yes'), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0, + ), + 'Modified' => Array ( + 'type' => 'int', + 'formatter' => 'kDateFormatter', + 'required' => 1, 'default' => '#NOW#', + ), + 'TopicText' => Array ( + 'type' => 'string', + 'required' => 1, 'default' => '', 'not_null' => 1, + ), + 'AutomaticFilename' => Array ('type' => 'int', 'not_null' => 1, 'default' => 1), + 'Posts' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Views' => Array ( + 'type' => 'double', + 'formatter' => 'kFormatter', + 'format' => '%d', + 'not_null' => 1, 'default' => 0, + ), + 'EditorsPick' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0, + ), + 'Status' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array ( + 0 => 'la_Disabled', + 1 => 'la_Active', + 2 => 'la_Pending', + ), + 'use_phrases' => 1, + 'not_null' => 1, 'default' => 2, + ), + 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'OwnerId' => Array ( + 'type' => 'int', + 'formatter' => 'kLEFTFormatter', + 'options' => Array (-1 => 'root', -2 => 'Guest'), + 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'PortalUser + WHERE `%s` = \'%s\' ', + 'left_key_field' => 'PortalUserId', + 'left_title_field' => 'Login', + 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), + 'required' => 1, 'not_null' => 1, 'default' => -1, + ), + 'ModifiedById' => Array ( + 'type' => 'int', + 'formatter' => 'kLEFTFormatter', + 'options' => Array (-1 => 'root', -2 => 'Guest'), + 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'PortalUser + WHERE `%s` = \'%s\' ', + 'left_key_field' => 'PortalUserId', + 'left_title_field' => 'Login', + 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), + 'required' => 1, 'not_null' => 1, 'default' => -1, + ), + 'ResourceId' => Array ('type' => 'int', 'default' => null), + 'TopicType' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_Yes', 1 => 'la_No'), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 1, + ), + 'CreatedOn' => Array ( + 'type' => 'double', + 'formatter' => 'kDateFormatter', + 'required' => 1, 'default' => '#NOW#', + ), + 'CachedReviewsQty' => Array ('type' => 'int' , 'not_null' => 1, 'default' => 0), + 'CachedRating' => Array ('type' => 'string', 'not_null' => 1, 'default' => 0), + 'CachedVotesQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'NewItem' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, + 'options' => Array ( + 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never', + ), + 'default' => 2, 'not_null' => 1, + ), + 'PopItem' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, + 'options' => Array ( + 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never', + ), + 'default' => 2, 'not_null' => 1, + ), + 'HotItem' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', 'use_phrases' => 1, + 'options' => Array ( + 2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never', + ), + 'default' => 2, 'not_null' => 1, + ), + 'PostedBy' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'OrgId' => Array ('type' => 'int', 'default' => null), + 'LastPostId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'LastPostDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null), + 'TodayDate' => Array ('type' => 'string', 'default' => null), + 'TodayPosts' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'MetaKeywords' => Array ('type' => 'string', 'default' => null), + 'MetaDescription' => Array ( + 'type' => 'string', + 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null), + ), 'VirtualFields' => Array ( - 'UserName' => Array ('type'=>'string', 'default' => ''), - 'CategoryId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => 0), + 'UserName' => Array ('type' => 'string', 'default' => ''), + 'CategoryId' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (), + 'default' => 0, + ), 'Filename' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), 'CachedNavbar' => Array ('type' => 'string', 'default' => ''), 'LastPoster' => Array ('type' => 'string', 'default' => ''), 'LastPosterId' => Array ('type' => 'int', 'default' => -2), - 'PostingText' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'required' => 1, 'using_fck' => 1, 'allow_html' => 1, 'default' => ''), - 'DisableBBCodes' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 0), - 'DisableSmileys' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'default' => 0), - 'ShowSignatures' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 1), + 'PostingText' => Array ( + 'type' => 'string', + 'formatter' => 'kFormatter', 'using_fck' => 1, + 'required' => 1, 'allow_html' => 1, 'default' => '', + ), + 'DisableBBCodes' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1, + 'default' => 0, + ), + 'DisableSmileys' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1, + 'default' => 0, + ), + 'ShowSignatures' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1, + 'default' => 1, + ), // for primary image - 'SameImages' => Array('type' => 'string', 'default' => ''), - 'LocalThumb' => Array('type' => 'string', 'default' => ''), - 'ThumbPath' => Array('type' => 'string', 'default' => ''), - 'ThumbUrl' => Array('type' => 'string', 'default' => ''), - 'LocalImage' => Array('type' => 'string', 'default' => ''), - 'LocalPath' => Array('type' => 'string', 'default' => ''), - 'FullUrl' => Array('type' => 'string', 'default' => ''), + 'AltName' => Array ('type' => 'string', 'default' => ''), + 'SameImages' => Array ('type' => 'string', 'default' => ''), + 'LocalThumb' => Array ('type' => 'string', 'default' => ''), + 'ThumbPath' => Array ('type' => 'string', 'default' => ''), + 'ThumbUrl' => Array ('type' => 'string', 'default' => ''), + 'LocalImage' => Array ('type' => 'string', 'default' => ''), + 'LocalPath' => Array ('type' => 'string', 'default' => ''), + 'FullUrl' => Array ('type' => 'string', 'default' => ''), ), - 'Grids' => Array( - 'Default' => Array( - 'Icons' => Array( + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( 'default' => 'icon16_topic.png', 0 => 'icon16_topic_disabled.png', 1 => 'icon16_topic.png', 2 => 'icon16_topic_pending.png', 'NEW' => 'icon16_topic_new.png', ), - 'Fields' => Array( - 'TopicId' => Array('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), - 'TopicText' => Array('title' => 'la_col_TopicText', 'data_block' => 'grid_catitem_td', 'filter_block' => 'grid_like_filter', 'width' => 300, 'first_chars' => 290, ), - 'UserName' => Array('title' => 'la_col_PostedBy', 'filter_block' => 'grid_like_filter', 'width' => 150, ), - 'CreatedOn' => Array('title' => 'la_col_CreatedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ), - 'Status' => Array('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 70, ), - 'LastPostDate' => Array('title' => 'la_col_LastPostOn', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ), - 'Posts' => Array('title' => 'la_col_Posts', 'filter_block' => 'grid_range_filter', 'width' => 70, ), - 'Views' => Array('title' => 'la_col_Views', 'filter_block' => 'grid_range_filter', 'width' => 70, ), + 'Fields' => Array ( + 'TopicId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), + 'TopicText' => Array ('title' => 'la_col_TopicText', 'data_block' => 'grid_catitem_td', 'filter_block' => 'grid_like_filter', 'width' => 300, 'first_chars' => 290, ), + 'UserName' => Array ('title' => 'la_col_PostedBy', 'filter_block' => 'grid_like_filter', 'width' => 150, ), + 'CreatedOn' => Array ('title' => 'la_col_CreatedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ), + 'Status' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 70, ), + 'LastPostDate' => Array ('title' => 'la_col_LastPostOn', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ), + 'Posts' => Array ('title' => 'la_col_Posts', 'filter_block' => 'grid_range_filter', 'width' => 70, ), + 'Views' => Array ('title' => 'la_col_Views', 'filter_block' => 'grid_range_filter', 'width' => 70, ), ), ), - 'Radio' => Array( - 'Icons' => Array( + 'Radio' => Array ( + 'Icons' => Array ( 'default' => 'icon16_topic.png', 0 => 'icon16_topic_disabled.png', 1 => 'icon16_topic.png', 2 => 'icon16_topic_pending.png', 'NEW' => 'icon16_topic_new.png', ), 'Selector' => 'radio', - 'Fields' => Array( - 'TopicId' => Array('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), - 'TopicText' => Array('title' => 'la_col_TopicText', 'data_block' => 'grid_catitem_td', 'filter_block' => 'grid_like_filter', 'width' => 300, 'first_chars' => 290, ), - 'UserName' => Array('title' => 'la_col_PostedBy', 'filter_block' => 'grid_like_filter', 'width' => 150, ), - 'CreatedOn' => Array('title' => 'la_col_CreatedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ), - 'Status' => Array('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 70, ), - 'LastPostDate' => Array('title' => 'la_col_LastPostOn', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ), - 'Posts' => Array('title' => 'la_col_Posts', 'filter_block' => 'grid_range_filter', 'width' => 70, ), - 'Views' => Array('title' => 'la_col_Views', 'filter_block' => 'grid_range_filter', 'width' => 70, ), + 'Fields' => Array ( + 'TopicId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), + 'TopicText' => Array ('title' => 'la_col_TopicText', 'data_block' => 'grid_catitem_td', 'filter_block' => 'grid_like_filter', 'width' => 300, 'first_chars' => 290, ), + 'UserName' => Array ('title' => 'la_col_PostedBy', 'filter_block' => 'grid_like_filter', 'width' => 150, ), + 'CreatedOn' => Array ('title' => 'la_col_CreatedOn', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ), + 'Status' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter', 'width' => 70, ), + 'LastPostDate' => Array ('title' => 'la_col_LastPostOn', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ), + 'Posts' => Array ('title' => 'la_col_Posts', 'filter_block' => 'grid_range_filter', 'width' => 70, ), + 'Views' => Array ('title' => 'la_col_Views', 'filter_block' => 'grid_range_filter', 'width' => 70, ), ), ), ), - 'ConfigMapping' => Array( + 'ConfigMapping' => Array ( 'PerPage' => 'Perpage_Topics', 'ShortListPerPage' => 'Perpage_Topics_Short', 'ForceEditorPick' => 'Topic_EditorPicksAbove', Index: branches/5.1.x/units/emoticons/emoticons_config.php =================================================================== diff -u -N -r13155 -r13548 --- branches/5.1.x/units/emoticons/emoticons_config.php (.../emoticons_config.php) (revision 13155) +++ branches/5.1.x/units/emoticons/emoticons_config.php (.../emoticons_config.php) (revision 13548) @@ -1,6 +1,6 @@ Array ('type' => 'int', 'not_null' => 1, 'default' => 0), 'Name' => Array ('type' => 'string', 'max_len' => 20, 'not_null' => 1, 'required' => 1, 'default' => ''), 'KeyStroke' => Array ('type' => 'string', 'max_len' => 20, 'not_null' => 1, 'required' => 1, 'default' => ''), - 'Enabled' => Array ('type' => 'int', 'not_null' => 1, 'default' => 1), + 'Enabled' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1, + 'default' => 1, 'not_null' => 1, + ), 'EmotionImage' => Array ( 'type' => 'string', 'max_len' => 255, 'formatter' => 'kUploadFormatter', 'allowed_types' => Array ('image/jpeg', 'image/jpg', 'image/gif', 'image/png', 'image/pjpeg'), Index: branches/5.1.x/install/english.lang =================================================================== diff -u -N -r13136 -r13548 --- branches/5.1.x/install/english.lang (.../english.lang) (revision 13136) +++ branches/5.1.x/install/english.lang (.../english.lang) (revision 13548) @@ -19,7 +19,6 @@ Q2Vuc29yZWQgV29yZA== VG9waWNzIEl0ZW0gVGVtcGxhdGU= RW5kIERhdGU= - SW1hZ2U= S2V5IFN0cm9rZQ== QW5zd2Vy Q29tbWVudA== Index: branches/5.1.x/units/polls/polls_config.php =================================================================== diff -u -N -r13155 -r13548 --- branches/5.1.x/units/polls/polls_config.php (.../polls_config.php) (revision 13155) +++ branches/5.1.x/units/polls/polls_config.php (.../polls_config.php) (revision 13548) @@ -1,6 +1,6 @@ 'poll', - 'ItemClass' => Array('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array('class' => 'PollEventHandler', 'file' => 'poll_eh.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array('class' => 'PollTagProcessor', 'file' => 'poll_tp.php', 'build_event' => 'OnBuild'), + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'PollEventHandler', 'file' => 'poll_eh.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'PollTagProcessor', 'file' => 'poll_tp.php', 'build_event' => 'OnBuild'), 'AutoLoad' => true, - 'QueryString' => Array( + 'QueryString' => Array ( 1 => 'id', 2 => 'Page', 3 => 'PerPage', @@ -33,18 +33,18 @@ 'IDField' => 'PollId', 'TitleField' => 'Name', - 'StatusField' => Array('Status'), + 'StatusField' => Array ('Status'), - 'TitlePresets' => Array( - 'default' => Array( - 'new_status_labels' => Array('poll' => '!la_title_Adding_Poll!'), - 'edit_status_labels' => Array('poll' => '!la_title_Editing_Poll!'), - 'new_titlefield' => Array('poll' => '!la_title_NewPoll!'), + 'TitlePresets' => Array ( + 'default' => Array ( + 'new_status_labels' => Array ('poll' => '!la_title_Adding_Poll!'), + 'edit_status_labels' => Array ('poll' => '!la_title_Editing_Poll!'), + 'new_titlefield' => Array ('poll' => '!la_title_NewPoll!'), ), - 'poll_list' => Array('prefixes' => Array('poll_List'), 'format' => "!la_title_Polls!", ), - 'poll_edit' => Array('prefixes' => Array('poll'), 'format' => "#poll_status# '#poll_titlefield#' - !la_title_General!", ), + 'poll_list' => Array ('prefixes' => Array ('poll_List'), 'format' => "!la_title_Polls!", ), + 'poll_edit' => Array ('prefixes' => Array ('poll'), 'format' => "#poll_status# '#poll_titlefield#' - !la_title_General!", ), 'poll_edit_answers' => Array ('prefixes' => Array ('poll', 'poll-answer_List'), 'format' => "#poll_status# '#poll_titlefield#' - !la_title_PollAnswers!"), 'poll_edit_comments' => Array ('prefixes' => Array ('poll', 'poll-comment_List'), 'format' => "#poll_status# '#poll_titlefield#' - !la_title_PollComments!"), @@ -68,66 +68,90 @@ ), - 'PermSection' => Array('main' => 'in-bulletin:polls'), + 'PermSection' => Array ('main' => 'in-bulletin:polls'), 'Sections' => Array ( 'in-bulletin:polls' => Array ( 'parent' => 'in-portal:site', 'icon' => 'polls', 'label' => 'la_title_Polls', - 'url' => Array('t' => 'in-bulletin/polls/poll_list', 'pass' => 'm'), - 'permissions' => Array('view', 'add', 'edit', 'delete'), + 'url' => Array ('t' => 'in-bulletin/polls/poll_list', 'pass' => 'm'), + 'permissions' => Array ('view', 'add', 'edit', 'delete'), 'priority' => 3.6, 'type' => stTREE, ), ), 'TableName' => TABLE_PREFIX.'Polls', - 'ListSQLs' => Array('' => 'SELECT %1$s.* %2$s + 'ListSQLs' => Array ('' => 'SELECT %1$s.* %2$s FROM %1$s', ), - 'ItemSQLs' => Array('' => 'SELECT %1$s.* %2$s + 'ItemSQLs' => Array ('' => 'SELECT %1$s.* %2$s FROM %1$s', ), - 'ListSortings' => Array( + 'ListSortings' => Array ( '' => Array ( - 'Sorting' => Array('PollId' => 'asc'), + 'Sorting' => Array ('PollId' => 'asc'), ) ), 'Fields' => Array ( - 'PollId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,), - 'Name' => Array('type' => 'string', 'not_null' => '1','default' => '', 'required'=> 1, 'max_len' => 255), - 'Question' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'using_fck' => 1, 'default' => null, 'required' => 1), - 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#'), - 'StartDate' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#'), - 'EndDate' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null), - 'Image' => Array ( - 'type' => 'string', - 'formatter' => 'kPictureFormatter', - 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => IMAGES_PATH . 'polls/', - 'file_types' => '*.jpg;*.gif;*.png', 'files_description' => '!la_hint_ImageFiles!', - 'multiple' => false, - 'max_len' => 255, 'not_null' => 1, 'default' => '' - ), - 'Priority' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'RequireLogin' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,), - 'AllowComments' => Array('type' => 'int', 'not_null' => 1, 'default' => 1,), - 'AllowMultipleVotings' => Array('type' => 'int', 'not_null' => 1, 'default' => 1,), - 'CachedVotesQty'=> Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Active', 0 => 'la_opt_Disabled'), 'use_phrases' => 1, 'required' => 1, 'not_null' => 1, 'default' => 1), + 'PollId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), + 'Name' => Array ('type' => 'string', 'not_null' => '1', 'default' => '', 'required' => 1, 'max_len' => 255), + 'Question' => Array ( + 'type' => 'string', + 'formatter' => 'kMultiLanguage', 'using_fck' => 1, + 'default' => null, 'required' => 1, + ), + 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#'), + 'StartDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#'), + 'EndDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null), + 'Image' => Array ( + 'type' => 'string', + 'formatter' => 'kPictureFormatter', + 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => IMAGES_PATH . 'polls/', + 'file_types' => '*.jpg;*.gif;*.png', 'files_description' => '!la_hint_ImageFiles!', + 'multiple' => false, + 'max_len' => 255, 'not_null' => 1, 'default' => '' + ), + 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'RequireLogin' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1, + 'default' => 0, 'not_null' => 1, + ), + 'AllowComments' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1, + 'default' => 1, 'not_null' => 1, + ), + 'AllowMultipleVotings' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_No', 1 => 'la_Yes',), 'use_phrases' => 1, + 'default' => 1, 'not_null' => 1, + ), + 'CachedVotesQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Status' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_opt_Disabled', 1 => 'la_opt_Active',), 'use_phrases' => 1, + 'required' => 1, 'default' => 1, 'not_null' => 1, + ), - ), + ), 'SubItems' => Array ('poll-answer', 'poll-comment'), 'VirtualFields' => Array ( -// 'PollId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,), +// 'PollId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), ), 'CalculatedFields' => Array ( Index: branches/5.1.x/admin_templates/polls/answer_edit.tpl =================================================================== diff -u -N -r13094 -r13548 --- branches/5.1.x/admin_templates/polls/answer_edit.tpl (.../answer_edit.tpl) (revision 13094) +++ branches/5.1.x/admin_templates/polls/answer_edit.tpl (.../answer_edit.tpl) (revision 13548) @@ -38,7 +38,7 @@ 'prev', '', function() { - go_to_id('poll-answer', ''); + go_to_id('poll-answer', ''); } ) ); @@ -48,7 +48,7 @@ 'next', '', function() { - go_to_id('poll-answer', ''); + go_to_id('poll-answer', ''); } ) ); @@ -70,7 +70,7 @@ - + Index: branches/5.1.x/install/install_data.sql =================================================================== diff -u -N -r13464 -r13548 --- branches/5.1.x/install/install_data.sql (.../install_data.sql) (revision 13464) +++ branches/5.1.x/install/install_data.sql (.../install_data.sql) (revision 13548) @@ -149,10 +149,8 @@ INSERT INTO SearchConfig VALUES ('Topic', 'OrgId', 0, 1, 'lu_fielddesc_topic_orgid', 'lu_field_orgid', 'In-Bulletin', 'la_text_topic', 21, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); INSERT INTO SearchConfig VALUES ('Topic', 'LastPostId', 0, 1, 'lu_fielddesc_topic_lastpostid', 'lu_field_lastpostid', 'In-Bulletin', 'la_text_topic', 22, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL); -INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.VIEW', 14, 1, 0, {TopicCatId}); INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.VIEW', 14, 1, 0, {TopicCatId}); INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.REPLY.VIEW', 14, 1, 0, {TopicCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.VIEW', 12, 1, 0, {TopicCatId}); INSERT INTO Permissions VALUES (DEFAULT, 'FAVORITES', 12, 1, 0, {TopicCatId}); INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.VIEW', 12, 1, 0, {TopicCatId}); INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.REPLY.VIEW', 12, 1, 0, {TopicCatId}); @@ -162,8 +160,6 @@ INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.OWNER.DELETE', 12, 1, 0, {TopicCatId}); INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.OWNER.MODIFY.PENDING', 12, 1, 0, {TopicCatId}); INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.OWNER.MODIFY', 12, 1, 0, {TopicCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.VIEW', 13, 1, 0, {TopicCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.ADD.PENDING', 13, 1, 0, {TopicCatId}); INSERT INTO Permissions VALUES (DEFAULT, 'FAVORITES', 13, 1, 0, {TopicCatId}); INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.VIEW', 13, 1, 0, {TopicCatId}); INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.ADD', 13, 1, 0, {TopicCatId}); @@ -174,10 +170,6 @@ INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.REPLY.OWNER.MODIFY', 13, 1, 0, {TopicCatId}); INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.REPLY.OWNER.DELETE', 13, 1, 0, {TopicCatId}); INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.OWNER.MODIFY', 13, 1, 0, {TopicCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.VIEW', 11, 1, 0, {TopicCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.ADD', 11, 1, 0, {TopicCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.DELETE', 11, 1, 0, {TopicCatId}); -INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.MODIFY', 11, 1, 0, {TopicCatId}); INSERT INTO Permissions VALUES (DEFAULT, 'FAVORITES', 11, 1, 0, {TopicCatId}); INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.VIEW', 11, 1, 0, {TopicCatId}); INSERT INTO Permissions VALUES (DEFAULT, 'TOPIC.ADD', 11, 1, 0, {TopicCatId}); Index: branches/5.1.x/units/posts/posts_config.php =================================================================== diff -u -N -r13184 -r13548 --- branches/5.1.x/units/posts/posts_config.php (.../posts_config.php) (revision 13184) +++ branches/5.1.x/units/posts/posts_config.php (.../posts_config.php) (revision 13548) @@ -1,6 +1,6 @@ Array ( 'UserName' => 'IF (ISNULL(u.Login), IF (%1$s.CreatedById = -1, "root", IF (%1$s.CreatedById = -2, "Guest", "n/a")), u.Login)', + 'AltName' => 'img.AltName', 'SameImages' => 'img.SameImages', 'LocalThumb' => 'img.LocalThumb', 'ThumbPath' => 'img.ThumbPath', @@ -100,6 +101,7 @@ 'ShowSignatures' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 1), // for avatar image + 'AltName' => Array('type' => 'string', 'default' => ''), 'SameImages' => Array('type' => 'string', 'default' => ''), 'LocalThumb' => Array('type' => 'string', 'default' => ''), 'ThumbPath' => Array('type' => 'string', 'default' => ''), Index: branches/5.1.x/units/topics/topics_event_handler.php =================================================================== diff -u -N -r13094 -r13548 --- branches/5.1.x/units/topics/topics_event_handler.php (.../topics_event_handler.php) (revision 13094) +++ branches/5.1.x/units/topics/topics_event_handler.php (.../topics_event_handler.php) (revision 13548) @@ -1,6 +1,6 @@ Application->RecallPersistentVar('show_sig'); $this->Application->setUnitOption($event->Prefix, 'VirtualFields', $virtual_fields); } + + /** + * [HOOK] Allows to add cloned subitem to given prefix + * + * @param kEvent $event + */ + function OnCloneSubItem(&$event) + { + parent::OnCloneSubItem($event); + + if ($event->MasterEvent->Prefix == 'rev') { + $clones = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'Clones'); + $subitem_prefix = $event->Prefix . '-' . $event->MasterEvent->Prefix; + + $clones[$subitem_prefix]['ConfigMapping'] = Array ( + 'PerPage' => 'Perpage_TopicReviews', + + 'ReviewDelayInterval' => 'topic_ReviewDelay_Interval', + 'ReviewDelayValue' => 'topic_ReviewDelay_Value', + ); + + $this->Application->setUnitOption($event->MasterEvent->Prefix, 'Clones', $clones); + } + } } \ No newline at end of file Index: branches/5.1.x/admin_templates/polls/poll_list.tpl =================================================================== diff -u -N -r13094 -r13548 --- branches/5.1.x/admin_templates/polls/poll_list.tpl (.../poll_list.tpl) (revision 13094) +++ branches/5.1.x/admin_templates/polls/poll_list.tpl (.../poll_list.tpl) (revision 13548) @@ -82,7 +82,7 @@ - + Index: branches/5.1.x/admin_templates/polls/poll_edit_answers.tpl =================================================================== diff -u -N -r13094 -r13548 --- branches/5.1.x/admin_templates/polls/poll_edit_answers.tpl (.../poll_edit_answers.tpl) (revision 13094) +++ branches/5.1.x/admin_templates/polls/poll_edit_answers.tpl (.../poll_edit_answers.tpl) (revision 13548) @@ -144,7 +144,7 @@ - + Index: branches/5.1.x/admin_templates/emoticons/emoticon_list.tpl =================================================================== diff -u -N -r13094 -r13548 --- branches/5.1.x/admin_templates/emoticons/emoticon_list.tpl (.../emoticon_list.tpl) (revision 13094) +++ branches/5.1.x/admin_templates/emoticons/emoticon_list.tpl (.../emoticon_list.tpl) (revision 13548) @@ -41,7 +41,7 @@ - +