AntonLV 7 лет назад
Родитель
Сommit
6d9d280f83

+ 3 - 3
modules/base/profile/classes/BxBaseModProfileAlertsResponse.php

@@ -94,6 +94,7 @@ class BxBaseModProfileAlertsResponse extends BxBaseModGeneralAlertsResponse
         case 'timeline_comment':
         case 'timeline_report':
         case 'timeline_vote':
+        case 'timeline_score':
             $this->processTimelineEventsBoolResult($oAlert, $oAlert->iObject);
             break;
 
@@ -101,6 +102,8 @@ class BxBaseModProfileAlertsResponse extends BxBaseModGeneralAlertsResponse
             $this->processTimelineEventsCheckResult($oAlert, $oAlert->iObject);
             break;
 
+        case 'timeline_pin':
+        case 'timeline_promote':
         case 'timeline_delete':
             $this->processTimelineEventsCheckResult($oAlert, $oAlert->iObject, 'checkAllowedEdit');
             break;
@@ -155,9 +158,6 @@ class BxBaseModProfileAlertsResponse extends BxBaseModGeneralAlertsResponse
 
     protected function processTimelineEventsCheckResult ($oAlert, $iGroupProfileId, $sFunc = 'checkAllowedPost')
     {
-        if ($oAlert->aExtras['check_result'][CHECK_ACTION_RESULT] !== CHECK_ACTION_RESULT_ALLOWED)
-            return;
-
         $oGroupProfile = BxDolProfile::getInstance($iGroupProfileId);
         if (!$oGroupProfile) 
             return;

+ 3 - 0
modules/boonex/channels/install/sql/enable.sql

@@ -394,8 +394,11 @@ INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
 ('bx_channels', 'timeline_delete', @iHandler),
 ('bx_channels', 'timeline_comment', @iHandler),
 ('bx_channels', 'timeline_vote', @iHandler),
+('bx_channels', 'timeline_score', @iHandler),
 ('bx_channels', 'timeline_report', @iHandler),
 ('bx_channels', 'timeline_repost', @iHandler),
+('bx_channels', 'timeline_pin', @iHandler),
+('bx_channels', 'timeline_promote', @iHandler),
 ('bx_persons', 'added', @iHandler),
 ('bx_persons', 'edited', @iHandler),
 ('bx_organizations', 'added', @iHandler),

+ 2 - 2
modules/boonex/events/install/sql/disable.sql

@@ -48,13 +48,13 @@ DELETE FROM `sys_alerts` WHERE `handler_id` = @iHandler;
 DELETE FROM `sys_alerts_handlers` WHERE `id` = @iHandler;
 
 -- PRIVACY 
-DELETE FROM `sys_objects_privacy` WHERE `object` IN('bx_events_allow_view_to', 'bx_events_allow_view_notification_to');
+DELETE FROM `sys_objects_privacy` WHERE `object` IN ('bx_events_allow_view_to', 'bx_events_allow_view_notification_to', 'bx_events_allow_post_to');
 
 -- EMAIL TEMPLATES
 DELETE FROM `sys_email_templates` WHERE `Module` = 'bx_events';
 
 -- UPLOADERS
-DELETE FROM `sys_objects_uploader` WHERE `object` IN('bx_events_cover_crop', 'bx_events_picture_crop');
+DELETE FROM `sys_objects_uploader` WHERE `object` IN ('bx_events_cover_crop', 'bx_events_picture_crop');
 
 -- CRON
 DELETE FROM `sys_cron_jobs` WHERE `name` = 'bx_events_process_reminders';

+ 4 - 1
modules/boonex/events/install/sql/enable.sql

@@ -515,8 +515,11 @@ INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
 ('bx_events', 'timeline_delete', @iHandler),
 ('bx_events', 'timeline_comment', @iHandler),
 ('bx_events', 'timeline_vote', @iHandler),
+('bx_events', 'timeline_score', @iHandler),
 ('bx_events', 'timeline_report', @iHandler),
-('bx_events', 'timeline_repost', @iHandler);
+('bx_events', 'timeline_repost', @iHandler),
+('bx_events', 'timeline_pin', @iHandler),
+('bx_events', 'timeline_promote', @iHandler);
 
 -- PRIVACY 
 INSERT INTO `sys_objects_privacy` (`object`, `module`, `action`, `title`, `default_group`, `spaces`, `table`, `table_field_id`, `table_field_author`, `override_class_name`, `override_class_file`) VALUES

+ 2 - 2
modules/boonex/groups/install/sql/disable.sql

@@ -48,10 +48,10 @@ DELETE FROM `sys_alerts` WHERE `handler_id` = @iHandler;
 DELETE FROM `sys_alerts_handlers` WHERE `id` = @iHandler;
 
 -- PRIVACY 
-DELETE FROM `sys_objects_privacy` WHERE `object` IN('bx_groups_allow_view_to', 'bx_groups_allow_view_notification_to');
+DELETE FROM `sys_objects_privacy` WHERE `object` IN ('bx_groups_allow_view_to', 'bx_groups_allow_view_notification_to', 'bx_groups_allow_post_to');
 
 -- EMAIL TEMPLATES
 DELETE FROM `sys_email_templates` WHERE `Module` = 'bx_groups';
 
 -- UPLOADERS
-DELETE FROM `sys_objects_uploader` WHERE `object` IN('bx_groups_cover_crop', 'bx_groups_picture_crop');
+DELETE FROM `sys_objects_uploader` WHERE `object` IN ('bx_groups_cover_crop', 'bx_groups_picture_crop');

+ 4 - 1
modules/boonex/groups/install/sql/enable.sql

@@ -490,8 +490,11 @@ INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
 ('bx_groups', 'timeline_delete', @iHandler),
 ('bx_groups', 'timeline_comment', @iHandler),
 ('bx_groups', 'timeline_vote', @iHandler),
+('bx_groups', 'timeline_score', @iHandler),
 ('bx_groups', 'timeline_report', @iHandler),
-('bx_groups', 'timeline_repost', @iHandler);
+('bx_groups', 'timeline_repost', @iHandler),
+('bx_groups', 'timeline_pin', @iHandler),
+('bx_groups', 'timeline_promote', @iHandler);
 
 -- PRIVACY 
 

+ 2 - 2
modules/boonex/organizations/install/sql/disable.sql

@@ -51,10 +51,10 @@ DELETE FROM `sys_alerts` WHERE `handler_id` = @iHandler;
 DELETE FROM `sys_alerts_handlers` WHERE `id` = @iHandler;
 
 -- PRIVACY 
-DELETE FROM `sys_objects_privacy` WHERE `object` IN('bx_organizations_allow_view_to', 'bx_organizations_allow_view_notification_to');
+DELETE FROM `sys_objects_privacy` WHERE `object` IN ('bx_organizations_allow_view_to', 'bx_organizations_allow_view_notification_to', 'bx_organizations_allow_post_to');
 
 -- EMAIL TEMPLATES
 DELETE FROM `sys_email_templates` WHERE `Module` = 'bx_organizations';
 
 -- UPLOADERS
-DELETE FROM `sys_objects_uploader` WHERE `object` IN('bx_organizations_cover_crop', 'bx_organizations_picture_crop');
+DELETE FROM `sys_objects_uploader` WHERE `object` IN ('bx_organizations_cover_crop', 'bx_organizations_picture_crop');

+ 4 - 1
modules/boonex/organizations/install/sql/enable.sql

@@ -590,8 +590,11 @@ INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
 ('bx_organizations', 'timeline_delete', @iHandler),
 ('bx_organizations', 'timeline_comment', @iHandler),
 ('bx_organizations', 'timeline_vote', @iHandler),
+('bx_organizations', 'timeline_score', @iHandler),
 ('bx_organizations', 'timeline_report', @iHandler),
-('bx_organizations', 'timeline_repost', @iHandler);
+('bx_organizations', 'timeline_repost', @iHandler),
+('bx_organizations', 'timeline_pin', @iHandler),
+('bx_organizations', 'timeline_promote', @iHandler);
 
 
 -- PRIVACY 

+ 2 - 2
modules/boonex/persons/install/sql/disable.sql

@@ -48,10 +48,10 @@ DELETE FROM `sys_alerts` WHERE `handler_id` = @iHandler;
 DELETE FROM `sys_alerts_handlers` WHERE `id` = @iHandler;
 
 -- PRIVACY 
-DELETE FROM `sys_objects_privacy` WHERE `object` IN('bx_persons_allow_view_to');
+DELETE FROM `sys_objects_privacy` WHERE `object` IN ('bx_persons_allow_view_to', 'bx_persons_allow_post_to');
 
 -- EMAIL TEMPLATES
 DELETE FROM `sys_email_templates` WHERE `Module` = 'bx_persons';
 
 -- UPLOADERS
-DELETE FROM `sys_objects_uploader` WHERE `object` IN('bx_persons_cover_crop', 'bx_persons_picture_crop');
+DELETE FROM `sys_objects_uploader` WHERE `object` IN ('bx_persons_cover_crop', 'bx_persons_picture_crop');

+ 4 - 1
modules/boonex/persons/install/sql/enable.sql

@@ -500,8 +500,11 @@ INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
 ('bx_persons', 'timeline_delete', @iHandler),
 ('bx_persons', 'timeline_comment', @iHandler),
 ('bx_persons', 'timeline_vote', @iHandler),
+('bx_persons', 'timeline_score', @iHandler),
 ('bx_persons', 'timeline_report', @iHandler),
-('bx_persons', 'timeline_repost', @iHandler);
+('bx_persons', 'timeline_repost', @iHandler),
+('bx_persons', 'timeline_pin', @iHandler),
+('bx_persons', 'timeline_promote', @iHandler);
 
 -- PRIVACY 
 INSERT INTO `sys_objects_privacy` (`object`, `module`, `action`, `title`, `default_group`, `spaces`, `table`, `table_field_id`, `table_field_author`, `override_class_name`, `override_class_file`) VALUES

+ 2 - 2
modules/boonex/spaces/install/sql/disable.sql

@@ -48,10 +48,10 @@ DELETE FROM `sys_alerts` WHERE `handler_id` = @iHandler;
 DELETE FROM `sys_alerts_handlers` WHERE `id` = @iHandler;
 
 -- PRIVACY 
-DELETE FROM `sys_objects_privacy` WHERE `object` IN('bx_spaces_allow_view_to', 'bx_spaces_allow_view_notification_to');
+DELETE FROM `sys_objects_privacy` WHERE `object` IN ('bx_spaces_allow_view_to', 'bx_spaces_allow_view_notification_to', 'bx_spaces_allow_post_to');
 
 -- EMAIL TEMPLATES
 DELETE FROM `sys_email_templates` WHERE `Module` = 'bx_spaces';
 
 -- UPLOADERS
-DELETE FROM `sys_objects_uploader` WHERE `object` IN('bx_spaces_cover_crop', 'bx_spaces_picture_crop');
+DELETE FROM `sys_objects_uploader` WHERE `object` IN ('bx_spaces_cover_crop', 'bx_spaces_picture_crop');

+ 4 - 1
modules/boonex/spaces/install/sql/enable.sql

@@ -494,8 +494,11 @@ INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
 ('bx_spaces', 'timeline_delete', @iHandler),
 ('bx_spaces', 'timeline_comment', @iHandler),
 ('bx_spaces', 'timeline_vote', @iHandler),
+('bx_spaces', 'timeline_score', @iHandler),
 ('bx_spaces', 'timeline_report', @iHandler),
-('bx_spaces', 'timeline_repost', @iHandler);
+('bx_spaces', 'timeline_repost', @iHandler),
+('bx_spaces', 'timeline_pin', @iHandler),
+('bx_spaces', 'timeline_promote', @iHandler);
 
 -- PRIVACY