Explorar el Código

Modules updates: Notifications and Timeline.

AntonLV hace 4 años
padre
commit
4772041a4d

+ 19 - 2
modules/boonex/notifications/updates/13.0.3_13.0.4/install/sql/install.sql

@@ -1,5 +1,22 @@
 SET @sName = 'bx_notifications';
 
 
--- MENUS
-UPDATE `sys_menu_items` SET `onclick`='bx_menu_slide(''bx_notifications_preview'', this, ''site'', {id:{value:''bx_notifications_preview'', force:1}, cssClass: ''''});' WHERE `set_name`='sys_toolbar_member' AND `name`='notifications-preview';
+-- TABLES
+UPDATE `bx_notifications_handlers` SET `priority`='1' WHERE `alert_unit`='meta_mention' AND `alert_action`='added';
+
+SET @iHandlerId = (SELECT `id` FROM `bx_notifications_handlers` WHERE `alert_unit`='comment' AND `alert_action`='added' LIMIT 1);
+DELETE FROM `bx_notifications_handlers` WHERE `id`=@iHandlerId;
+DELETE FROM `bx_notifications_settings` WHERE `handler_id`=@iHandlerId;
+
+INSERT INTO `bx_notifications_handlers`(`group`, `type`, `alert_unit`, `alert_action`, `content`) VALUES 
+('comment', 'insert', 'comment', 'added', 'a:3:{s:11:"module_name";s:6:"system";s:13:"module_method";s:31:"get_notifications_comment_added";s:12:"module_class";s:17:"TemplCmtsServices";}');
+SET @iHandlerId = LAST_INSERT_ID();
+
+INSERT INTO `bx_notifications_settings`(`group`, `handler_id`, `delivery`, `type`, `title`, `order`) VALUES
+('comment', @iHandlerId, 'site', 'personal', '_bx_ntfs_alert_action_comment_added_personal', 1),
+('comment', @iHandlerId, 'email', 'personal', '_bx_ntfs_alert_action_comment_added_personal', 1),
+('comment', @iHandlerId, 'push', 'personal', '_bx_ntfs_alert_action_comment_added_personal', 1);
+
+DELETE FROM `bx_notifications_handlers` WHERE `alert_unit`='comment' AND `alert_action`='deleted';
+INSERT INTO `bx_notifications_handlers`(`group`, `type`, `alert_unit`, `alert_action`, `content`) VALUES 
+('comment', 'delete', 'comment', 'deleted', '');

+ 1 - 1
modules/boonex/timeline/updates/13.0.4_13.0.5/install/sql/enable.sql

@@ -8,7 +8,7 @@ UPDATE `sys_objects_page` SET `url`='' WHERE `object`='bx_timeline_item_brief';
 
 -- SETTINGS
 SET @iHdrIdComment = (SELECT `id` FROM `bx_timeline_handlers` WHERE `group`='comment' AND `type`='insert' AND `alert_unit`='comment' AND `alert_action`='added' LIMIT 1);
-UPDATE `sys_options` SET `value`=CONCAT_WS(',', @iHdrIdComment) WHERE `name`='bx_timeline_events_hide';
+UPDATE `sys_options` SET `value`=@iHdrIdComment WHERE `name`='bx_timeline_events_hide' AND `value`='';
 
 
 SET @iCategId = (SELECT `id` FROM `sys_options_categories` WHERE `name`='bx_timeline_general' LIMIT 1);