RomanL 5 лет назад
Родитель
Сommit
1dcaef3aae

+ 3 - 3
modules/boonex/posts/classes/BxPostsModule.php

@@ -48,9 +48,9 @@ class BxPostsModule extends BxBaseModTextModule
     {
         $CNF = &$this->_oConfig->CNF;
         $aContentInfo = $this->_oDb->getContentInfoById($iContentId);
-        if ($aContentInfo[$CNF['FIELD_DISABLE_COMMENTS']] == 1)
+        if ($aContentInfo && $aContentInfo[$CNF['FIELD_DISABLE_COMMENTS']] == 1)
             return false;
-
+        
         return parent::serviceCheckAllowedCommentsPost($iContentId, $sObjectComments);
     }
 	
@@ -58,7 +58,7 @@ class BxPostsModule extends BxBaseModTextModule
     {
         $CNF = &$this->_oConfig->CNF;
         $aContentInfo = $this->_oDb->getContentInfoById($iContentId);
-        if ($aContentInfo[$CNF['FIELD_DISABLE_COMMENTS']] == 1)
+        if ($aContentInfo && $aContentInfo[$CNF['FIELD_DISABLE_COMMENTS']] == 1)
             return false;
 
         return parent::serviceCheckAllowedCommentsView($iContentId, $sObjectComments);

+ 3 - 1
modules/boonex/posts/install/sql/enable.sql

@@ -66,7 +66,8 @@ INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `t
 ('bx_posts_view_entry', 2, 'bx_posts', '', '_bx_posts_page_block_title_entry_comments', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:15:\"entity_comments\";}', 0, 0, 1, 6),
 ('bx_posts_view_entry', 3, 'bx_posts', '', '_bx_posts_page_block_title_entry_location', 3, 2147483647, 'service', 'a:4:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:13:\"locations_map\";s:6:\"params\";a:2:{i:0;s:8:\"bx_posts\";i:1;s:4:\"{id}\";}s:5:\"class\";s:20:\"TemplServiceMetatags\";}', 0, 0, 1, 3),
 ('bx_posts_view_entry', 2, 'bx_posts', '', '_bx_posts_page_block_title_entry_polls', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:12:\"entity_polls\";}', 0, 0, 1, 5),
-('bx_posts_view_entry', 3, 'bx_posts', '', '_bx_posts_page_block_title_featured_entries_view_extended', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_posts";s:6:"method";s:15:"browse_featured";s:6:"params";a:1:{i:0;s:8:"extended";}}', 0, 0, 1, 5);
+('bx_posts_view_entry', 3, 'bx_posts', '', '_bx_posts_page_block_title_featured_entries_view_extended', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:8:"bx_posts";s:6:"method";s:15:"browse_featured";s:6:"params";a:1:{i:0;s:8:"extended";}}', 0, 0, 1, 5),
+('bx_posts_view_entry', 2, 'bx_posts', '', '_bx_posts_page_block_title_entry_reports', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:8:\"bx_posts\";s:6:\"method\";s:14:\"entity_reports\";}', 0, 0, 1, 6);
 
 
 -- PAGE: view entry comments
@@ -269,6 +270,7 @@ INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `titl
 ('bx_posts_view_actions', 'bx_posts', 'repost', '_sys_menu_item_title_system_va_repost', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 260),
 ('bx_posts_view_actions', 'bx_posts', 'report', '_sys_menu_item_title_system_va_report', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 270),
 ('bx_posts_view_actions', 'bx_posts', 'notes', '_sys_menu_item_title_system_va_notes', '_sys_menu_item_title_va_notes', 'javascript:void(0)', 'javascript:bx_get_notes(this,  ''{module_uri}'', {content_id});', '', 'exclamation-triangle', '', '', 0, 2147483647, '', 1, 0, 280),
+('bx_posts_view_actions', 'bx_posts', 'audit', '_sys_menu_item_title_system_va_audit', '_sys_menu_item_title_va_audit', '/page/dashboard-audit?module=bx_posts&content_id={content_id}', '', '', 'history', '', '', 0, 192, '', 1, 0, 290),
 ('bx_posts_view_actions', 'bx_posts', 'social-sharing-facebook', '_sys_menu_item_title_system_social_sharing_facebook', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 300),
 ('bx_posts_view_actions', 'bx_posts', 'social-sharing-twitter', '_sys_menu_item_title_system_social_sharing_twitter', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 320),
 ('bx_posts_view_actions', 'bx_posts', 'social-sharing-pinterest', '_sys_menu_item_title_system_social_sharing_pinterest', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 330),

+ 2 - 0
modules/boonex/posts/install/sql/install.sql

@@ -292,6 +292,8 @@ CREATE TABLE IF NOT EXISTS `bx_posts_reports_track` (
   `type` varchar(32) NOT NULL default '',
   `text` text NOT NULL default '',
   `date` int(11) NOT NULL default '0',
+  `checked_by` int(11) NOT NULL default '0',
+  `status` tinyint(11) NOT NULL default '0',
   PRIMARY KEY (`id`),
   KEY `report` (`object_id`, `author_nip`)
 );