瀏覽代碼

Ticket #3556 - Point №2: Allow comments (Posts, etc)

AntonLV 5 年之前
父節點
當前提交
a55b577e1b

+ 1 - 1
modules/boonex/posts/classes/BxPostsConfig.php

@@ -58,7 +58,7 @@ class BxPostsConfig extends BxBaseModTextConfig
             'FIELD_LOCATION_PREFIX' => 'location',
             'FIELD_LABELS' => 'labels',
             'FIELD_ANONYMOUS' => 'anonymous',
-            'FIELD_DISABLE_COMMENTS' => 'disable_comments',
+            'FIELD_ALLOW_COMMENTS' => 'allow_comments',
             'FIELDS_WITH_KEYWORDS' => 'auto', // can be 'auto', array of fields or comma separated string of field names, works only when OBJECT_METATAGS is specified
             'FIELDS_DELAYED_PROCESSING' => 'videos', // can be array of fields or comma separated string of field names
             

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

@@ -22,7 +22,7 @@ class BxPostsModule extends BxBaseModTextModule
         $this->_aSearchableNamesExcept = array_merge($this->_aSearchableNamesExcept, array(
             $CNF['FIELD_PUBLISHED'],
             $CNF['FIELD_ANONYMOUS'],
-            $CNF['FIELD_DISABLE_COMMENTS']
+            $CNF['FIELD_ALLOW_COMMENTS']
         ));
     }
 
@@ -48,7 +48,7 @@ class BxPostsModule extends BxBaseModTextModule
     {
         $CNF = &$this->_oConfig->CNF;
         $aContentInfo = $this->_oDb->getContentInfoById($iContentId);
-        if ($aContentInfo && $aContentInfo[$CNF['FIELD_DISABLE_COMMENTS']] == 1)
+        if ($aContentInfo && $aContentInfo[$CNF['FIELD_ALLOW_COMMENTS']] == 0)
             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 && $aContentInfo[$CNF['FIELD_DISABLE_COMMENTS']] == 1)
+        if ($aContentInfo && $aContentInfo[$CNF['FIELD_ALLOW_COMMENTS']] == 0)
             return false;
 
         return parent::serviceCheckAllowedCommentsView($iContentId, $sObjectComments);

+ 2 - 2
modules/boonex/posts/install/langs/en.xml

@@ -65,8 +65,8 @@
     <string name="_bx_posts_form_entry_input_date_published"><![CDATA[Publishing time]]></string>
     <string name="_bx_posts_form_entry_input_date_published_info"><![CDATA[Leave empty to publish immediately.]]></string>
     <string name="_bx_posts_form_entry_input_sys_attachments"><![CDATA[Attachments]]></string>
-    <string name="_bx_posts_form_entry_input_sys_disable_comments"><![CDATA[Disable comments]]></string>
-    <string name="_bx_posts_form_entry_input_disable_comments"><![CDATA[Disable comments]]></string>
+    <string name="_bx_posts_form_entry_input_sys_allow_comments"><![CDATA[Allow comments]]></string>
+    <string name="_bx_posts_form_entry_input_allow_comments"><![CDATA[Allow comments]]></string>
 
     <string name="_bx_posts_form_poll"><![CDATA[Polls]]></string>
     <string name="_bx_posts_form_poll_display_add"><![CDATA[Add Poll]]></string>

+ 4 - 4
modules/boonex/posts/install/sql/install.sql

@@ -25,7 +25,7 @@ CREATE TABLE IF NOT EXISTS `bx_posts_posts` (
   `reports` int(11) NOT NULL default '0',
   `featured` int(11) NOT NULL default '0',
   `allow_view_to` varchar(16) NOT NULL DEFAULT '3',
-  `disable_comments` tinyint(4) NOT NULL DEFAULT '0',
+  `allow_comments` tinyint(4) NOT NULL DEFAULT '1',
   `status` enum('active','awaiting','failed','hidden') NOT NULL DEFAULT 'active',
   `status_admin` enum('active','hidden','pending') NOT NULL DEFAULT 'active',
   PRIMARY KEY (`id`),
@@ -466,7 +466,7 @@ INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `ch
 ('bx_posts', 'bx_posts', 'attachments', '', '', 0, 'custom', '_bx_posts_form_entry_input_sys_attachments', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_posts', 'bx_posts', 'labels', '', '', 0, 'custom', '_sys_form_input_sys_labels', '_sys_form_input_labels', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_posts', 'bx_posts', 'anonymous', '', '', 0, 'switcher', '_sys_form_input_sys_anonymous', '_sys_form_input_anonymous', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
-('bx_posts', 'bx_posts', 'disable_comments', '1', '', 0, 'switcher', '_bx_posts_form_entry_input_sys_disable_comments', '_bx_posts_form_entry_input_disable_comments', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0);
+('bx_posts', 'bx_posts', 'allow_comments', '1', '', 1, 'switcher', '_bx_posts_form_entry_input_sys_allow_comments', '_bx_posts_form_entry_input_allow_comments', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0);
 
 
 
@@ -485,7 +485,7 @@ INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for
 ('bx_posts_entry_add', 'allow_view_to', 2147483647, 1, 12),
 ('bx_posts_entry_add', 'location', 2147483647, 1, 13),
 ('bx_posts_entry_add', 'published', 192, 1, 14),
-('bx_posts_entry_add', 'disable_comments', 192, 1, 15),
+('bx_posts_entry_add', 'allow_comments', 192, 1, 15),
 ('bx_posts_entry_add', 'do_publish', 2147483647, 1, 16),
 
 ('bx_posts_entry_delete', 'delete_confirm', 2147483647, 1, 1),
@@ -505,7 +505,7 @@ INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for
 ('bx_posts_entry_edit', 'covers', 2147483647, 1, 12),
 ('bx_posts_entry_edit', 'allow_view_to', 2147483647, 1, 13),
 ('bx_posts_entry_edit', 'location', 2147483647, 1, 14),
-('bx_posts_entry_edit', 'disable_comments', 192, 1, 15),
+('bx_posts_entry_edit', 'allow_comments', 192, 1, 15),
 ('bx_posts_entry_edit', 'published', 192, 1, 16),
 ('bx_posts_entry_edit', 'do_submit', 2147483647, 1, 17),
 

+ 1 - 1
modules/boonex/reviews/classes/BxReviewsConfig.php

@@ -60,7 +60,7 @@ class BxReviewsConfig extends BxBaseModTextConfig
             'FIELD_LOCATION_PREFIX' => 'location',
             'FIELD_LABELS' => 'labels',
             'FIELD_ANONYMOUS' => 'anonymous',
-            'FIELD_DISABLE_COMMENTS' => 'disable_comments',
+            'FIELD_ALLOW_COMMENTS' => 'allow_comments',
             'FIELDS_WITH_KEYWORDS' => 'auto', // can be 'auto', array of fields or comma separated string of field names, works only when OBJECT_METATAGS is specified
             'FIELDS_DELAYED_PROCESSING' => 'videos', // can be array of fields or comma separated string of field names
 

+ 3 - 3
modules/boonex/reviews/classes/BxReviewsModule.php

@@ -20,7 +20,7 @@ class BxReviewsModule extends BxBaseModTextModule
 
         $CNF = &$this->_oConfig->CNF;
         $this->_aSearchableNamesExcept = array_merge($this->_aSearchableNamesExcept, array(
-            $CNF['FIELD_DISABLE_COMMENTS']
+            $CNF['FIELD_ALLOW_COMMENTS']
         ));
     }
 
@@ -68,7 +68,7 @@ class BxReviewsModule extends BxBaseModTextModule
     {
         $CNF = &$this->_oConfig->CNF;
         $aContentInfo = $this->_oDb->getContentInfoById($iContentId);
-        if ($aContentInfo && $aContentInfo[$CNF['FIELD_DISABLE_COMMENTS']] == 1)
+        if ($aContentInfo && $aContentInfo[$CNF['FIELD_ALLOW_COMMENTS']] == 0)
             return false;
 
         return parent::serviceCheckAllowedCommentsPost($iContentId, $sObjectComments);
@@ -78,7 +78,7 @@ class BxReviewsModule extends BxBaseModTextModule
     {
         $CNF = &$this->_oConfig->CNF;
         $aContentInfo = $this->_oDb->getContentInfoById($iContentId);
-        if ($aContentInfo[$CNF['FIELD_DISABLE_COMMENTS']] == 1)
+        if ($aContentInfo[$CNF['FIELD_ALLOW_COMMENTS']] == 0)
             return false;
 
         return parent::serviceCheckAllowedCommentsView($iContentId, $sObjectComments);

+ 2 - 2
modules/boonex/reviews/install/langs/en.xml

@@ -59,8 +59,8 @@
     <string name="_bx_reviews_form_entry_input_sys_date_changed"><![CDATA[Updated]]></string>
     <string name="_bx_reviews_form_entry_input_date_changed"><![CDATA[Updated]]></string>
     <string name="_bx_reviews_form_entry_input_sys_attachments"><![CDATA[Attachments]]></string>
-    <string name="_bx_reviews_form_entry_input_sys_disable_comments"><![CDATA[Disable comments]]></string>
-    <string name="_bx_reviews_form_entry_input_disable_comments"><![CDATA[Disable comments]]></string>
+    <string name="_bx_reviews_form_entry_input_sys_allow_comments"><![CDATA[Allow comments]]></string>
+    <string name="_bx_reviews_form_entry_input_allow_comments"><![CDATA[Allow comments]]></string>
 
     <string name="_bx_reviews_form_poll"><![CDATA[Polls]]></string>
     <string name="_bx_reviews_form_poll_display_add"><![CDATA[Add Poll]]></string>

+ 4 - 4
modules/boonex/reviews/install/sql/install.sql

@@ -30,7 +30,7 @@ CREATE TABLE IF NOT EXISTS `bx_reviews_reviews` (
   `allow_view_to` varchar(16) NOT NULL DEFAULT '3',
   `reviewed_profile` int(11) NOT NULL DEFAULT '0',
   `product` varchar(255) NOT NULL,
-  `disable_comments` tinyint(4) NOT NULL DEFAULT '0',
+  `allow_comments` tinyint(4) NOT NULL DEFAULT '1',
   `status` enum('active','awaiting','failed','hidden') NOT NULL DEFAULT 'active',
   `status_admin` enum('active','hidden','pending') NOT NULL DEFAULT 'active',
   PRIMARY KEY (`id`),
@@ -456,7 +456,7 @@ INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `ch
 ('bx_reviews', 'bx_reviews', 'attachments', '', '', 0, 'custom', '_bx_reviews_form_entry_input_sys_attachments', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_reviews', 'bx_reviews', 'labels', '', '', 0, 'custom', '_sys_form_input_sys_labels', '_sys_form_input_labels', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_reviews', 'bx_reviews', 'anonymous', '', '', 0, 'switcher', '_sys_form_input_sys_anonymous', '_sys_form_input_anonymous', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
-('bx_reviews', 'bx_reviews', 'disable_comments', '1', '', 0, 'switcher', '_bx_reviews_form_entry_input_sys_disable_comments', '_bx_reviews_form_entry_input_disable_comments', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
+('bx_reviews', 'bx_reviews', 'allow_comments', '1', '', 1, 'switcher', '_bx_reviews_form_entry_input_sys_allow_comments', '_bx_reviews_form_entry_input_allow_comments', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
 ('bx_reviews', 'bx_reviews', 'voting_options', '', '', 0, 'custom', '_bx_reviews_form_entry_input_sys_voting_options', '_bx_reviews_form_entry_input_voting_options', '', 0, 0, 0, '', '', '', '', '', '', 'VotingOptions', '', 1, 0),
 ('bx_reviews', 'bx_reviews', 'reviewed_profile', '', '', 0, 'custom', '_bx_reviews_form_entry_input_sys_reviewed_profile', '_bx_reviews_form_entry_input_reviewed_profile', '', 0, 0, 0, '', '', '', '', '', '', 'OneIntArray', '', 1, 0),
 ('bx_reviews', 'bx_reviews', 'product', '', '', 0, 'text', '_bx_reviews_form_entry_input_sys_product', '_bx_reviews_form_entry_input_product', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0);
@@ -478,7 +478,7 @@ INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for
 ('bx_reviews_entry_add', 'covers', 2147483647, 1, 12),
 ('bx_reviews_entry_add', 'allow_view_to', 2147483647, 1, 13),
 ('bx_reviews_entry_add', 'location', 2147483647, 0, 14),
-('bx_reviews_entry_add', 'disable_comments', 192, 0, 15),
+('bx_reviews_entry_add', 'allow_comments', 192, 0, 15),
 ('bx_reviews_entry_add', 'do_submit', 2147483647, 1, 20),
 
 ('bx_reviews_entry_delete', 'delete_confirm', 2147483647, 1, 1),
@@ -498,7 +498,7 @@ INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for
 ('bx_reviews_entry_edit', 'covers', 2147483647, 1, 12),
 ('bx_reviews_entry_edit', 'allow_view_to', 2147483647, 1, 13),
 ('bx_reviews_entry_edit', 'location', 2147483647, 0, 14),
-('bx_reviews_entry_edit', 'disable_comments', 192, 0, 15),
+('bx_reviews_entry_edit', 'allow_comments', 192, 0, 15),
 ('bx_reviews_entry_edit', 'do_submit', 2147483647, 1, 17),
 
 ('bx_reviews_entry_view', 'cat', 2147483647, 1, 1),

+ 2 - 2
modules/boonex/russian/data/langs/bx_posts/ru.xml

@@ -65,8 +65,8 @@
     <string name="_bx_posts_form_entry_input_date_published"><![CDATA[Время публикации]]></string>
     <string name="_bx_posts_form_entry_input_date_published_info"><![CDATA[Оставьте пустым, чтобы опубликовать немедленно.]]></string>
     <string name="_bx_posts_form_entry_input_sys_attachments"><![CDATA[Вложения]]></string>
-    <string name="_bx_posts_form_entry_input_sys_disable_comments"><![CDATA[Запретить комментарии]]></string>
-    <string name="_bx_posts_form_entry_input_disable_comments"><![CDATA[Запретить комментарии]]></string>
+    <string name="_bx_posts_form_entry_input_sys_allow_comments"><![CDATA[Разрешить комментарии]]></string>
+    <string name="_bx_posts_form_entry_input_allow_comments"><![CDATA[Разрешить комментарии]]></string>
 
     <string name="_bx_posts_form_poll"><![CDATA[Голосования]]></string>
     <string name="_bx_posts_form_poll_display_add"><![CDATA[Добавить голосование]]></string>

+ 2 - 2
modules/boonex/russian/data/langs/bx_reviews/ru.xml

@@ -59,8 +59,8 @@
     <string name="_bx_reviews_form_entry_input_sys_date_changed"><![CDATA[Обновлено]]></string>
     <string name="_bx_reviews_form_entry_input_date_changed"><![CDATA[Обновлено]]></string>
     <string name="_bx_reviews_form_entry_input_sys_attachments"><![CDATA[Вложения]]></string>
-    <string name="_bx_reviews_form_entry_input_sys_disable_comments"><![CDATA[Запретить комментарии]]></string>
-    <string name="_bx_reviews_form_entry_input_disable_comments"><![CDATA[Запретить комментарии]]></string>
+    <string name="_bx_reviews_form_entry_input_sys_allow_comments"><![CDATA[Разрешить комментарии]]></string>
+    <string name="_bx_reviews_form_entry_input_allow_comments"><![CDATA[Разрешить комментарии]]></string>
 
     <string name="_bx_reviews_form_poll"><![CDATA[Голосования]]></string>
     <string name="_bx_reviews_form_poll_display_add"><![CDATA[Добавить голосование]]></string>

+ 2 - 2
modules/boonex/russian/data/langs/bx_tasks/ru.xml

@@ -62,8 +62,8 @@
     <string name="_bx_tasks_form_entry_input_date_published"><![CDATA[Время публикации]]></string>
     <string name="_bx_tasks_form_entry_input_date_published_info"><![CDATA[Оставьте пустым, чтобы опубликовать немедленно.]]></string>
     <string name="_bx_tasks_form_entry_input_sys_attachments"><![CDATA[Вложения]]></string>
-    <string name="_bx_tasks_form_entry_input_sys_disable_comments"><![CDATA[Запретить комментарии]]></string>
-    <string name="_bx_tasks_form_entry_input_disable_comments"><![CDATA[Запретить комментарии]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_allow_comments"><![CDATA[Разрешить комментарии]]></string>
+    <string name="_bx_tasks_form_entry_input_allow_comments"><![CDATA[Разрешить комментарии]]></string>
 	
 	<string name="_bx_tasks_form_entry_input_sys_tasks_list"><![CDATA[Список заданий]]></string>
 	<string name="_bx_tasks_form_entry_input_tasks_list"><![CDATA[Список заданий]]></string>

+ 1 - 1
modules/boonex/stream/classes/BxStrmConfig.php

@@ -59,7 +59,7 @@ class BxStrmConfig extends BxBaseModTextConfig
             'FIELD_LOCATION_PREFIX' => 'location',
             'FIELD_LABELS' => 'labels',
             'FIELD_ANONYMOUS' => 'anonymous',
-            'FIELD_DISABLE_COMMENTS' => 'disable_comments',
+            'FIELD_ALLOW_COMMENTS' => 'allow_comments',
             'FIELDS_WITH_KEYWORDS' => 'auto', // can be 'auto', array of fields or comma separated string of field names, works only when OBJECT_METATAGS is specified
             'FIELD_KEY' => 'key',
             

+ 3 - 3
modules/boonex/stream/classes/BxStrmModule.php

@@ -24,7 +24,7 @@ class BxStrmModule extends BxBaseModTextModule
         $this->_aSearchableNamesExcept = array_merge($this->_aSearchableNamesExcept, array(
             $CNF['FIELD_PUBLISHED'],
             $CNF['FIELD_ANONYMOUS'],
-            $CNF['FIELD_DISABLE_COMMENTS']
+            $CNF['FIELD_ALLOW_COMMENTS']
         ));
     }
 
@@ -158,7 +158,7 @@ class BxStrmModule extends BxBaseModTextModule
     {
         $CNF = &$this->_oConfig->CNF;
         $aContentInfo = $this->_oDb->getContentInfoById($iContentId);
-        if ($aContentInfo && $aContentInfo[$CNF['FIELD_DISABLE_COMMENTS']] == 1)
+        if ($aContentInfo && $aContentInfo[$CNF['FIELD_ALLOW_COMMENTS']] == 0)
             return false;
         
         return parent::serviceCheckAllowedCommentsPost($iContentId, $sObjectComments);
@@ -168,7 +168,7 @@ class BxStrmModule extends BxBaseModTextModule
     {
         $CNF = &$this->_oConfig->CNF;
         $aContentInfo = $this->_oDb->getContentInfoById($iContentId);
-        if ($aContentInfo && $aContentInfo[$CNF['FIELD_DISABLE_COMMENTS']] == 1)
+        if ($aContentInfo && $aContentInfo[$CNF['FIELD_ALLOW_COMMENTS']] == 0)
             return false;
 
         return parent::serviceCheckAllowedCommentsView($iContentId, $sObjectComments);

+ 2 - 2
modules/boonex/stream/install/langs/en.xml

@@ -70,8 +70,8 @@
     <string name="_bx_stream_form_entry_input_sys_date_published"><![CDATA[Publishing time]]></string>
     <string name="_bx_stream_form_entry_input_date_published"><![CDATA[Publishing time]]></string>
     <string name="_bx_stream_form_entry_input_date_published_info"><![CDATA[Leave empty to publish immediately.]]></string>
-    <string name="_bx_stream_form_entry_input_sys_disable_comments"><![CDATA[Disable comments]]></string>
-    <string name="_bx_stream_form_entry_input_disable_comments"><![CDATA[Disable comments]]></string>
+    <string name="_bx_stream_form_entry_input_sys_allow_comments"><![CDATA[Allow comments]]></string>
+    <string name="_bx_stream_form_entry_input_allow_comments"><![CDATA[Allow comments]]></string>
     <string name="_bx_stream_form_entry_input_server"><![CDATA[Server]]></string>
     <string name="_bx_stream_form_entry_input_stream_key"><![CDATA[Stream Key]]></string>
 

+ 4 - 4
modules/boonex/stream/install/sql/install.sql

@@ -25,7 +25,7 @@ CREATE TABLE IF NOT EXISTS `bx_stream_streams` (
   `reports` int(11) NOT NULL default '0',
   `featured` int(11) NOT NULL default '0',
   `allow_view_to` varchar(16) NOT NULL DEFAULT '3',
-  `disable_comments` tinyint(4) NOT NULL DEFAULT '0',
+  `allow_comments` tinyint(4) NOT NULL DEFAULT '1',
   `status` enum('active','awaiting','failed','hidden') NOT NULL DEFAULT 'active',
   `status_admin` enum('active','hidden','pending') NOT NULL DEFAULT 'active',
   PRIMARY KEY (`id`),
@@ -266,7 +266,7 @@ INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `ch
 ('bx_stream', 'bx_stream', 'changed', '', '', 0, 'datetime', '_bx_stream_form_entry_input_sys_date_changed', '_bx_stream_form_entry_input_date_changed', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_stream', 'bx_stream', 'labels', '', '', 0, 'custom', '_sys_form_input_sys_labels', '_sys_form_input_labels', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_stream', 'bx_stream', 'anonymous', '', '', 0, 'switcher', '_sys_form_input_sys_anonymous', '_sys_form_input_anonymous', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
-('bx_stream', 'bx_stream', 'disable_comments', '1', '', 0, 'switcher', '_bx_stream_form_entry_input_sys_disable_comments', '_bx_stream_form_entry_input_disable_comments', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0);
+('bx_stream', 'bx_stream', 'allow_comments', '1', '', 1, 'switcher', '_bx_stream_form_entry_input_sys_allow_comments', '_bx_stream_form_entry_input_allow_comments', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0);
 
 
 
@@ -278,7 +278,7 @@ INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for
 ('bx_stream_entry_add', 'covers', 2147483647, 1, 5),
 ('bx_stream_entry_add', 'allow_view_to', 2147483647, 1, 6),
 ('bx_stream_entry_add', 'location', 2147483647, 1, 7),
-('bx_stream_entry_add', 'disable_comments', 192, 1, 8),
+('bx_stream_entry_add', 'allow_comments', 192, 1, 8),
 ('bx_stream_entry_add', 'do_publish', 2147483647, 1, 9),
 
 ('bx_stream_entry_delete', 'delete_confirm', 2147483647, 1, 1),
@@ -292,7 +292,7 @@ INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for
 ('bx_stream_entry_edit', 'covers', 2147483647, 1, 6),
 ('bx_stream_entry_edit', 'allow_view_to', 2147483647, 1, 7),
 ('bx_stream_entry_edit', 'location', 2147483647, 1, 8),
-('bx_stream_entry_edit', 'disable_comments', 192, 1, 9),
+('bx_stream_entry_edit', 'allow_comments', 192, 1, 9),
 ('bx_stream_entry_edit', 'do_submit', 2147483647, 1, 10),
 
 ('bx_stream_entry_view', 'cat', 2147483647, 1, 1),

+ 1 - 1
modules/boonex/tasks/classes/BxTasksConfig.php

@@ -61,7 +61,7 @@ class BxTasksConfig extends BxBaseModTextConfig
             'FIELD_EXPIRED' => 'expired',
             'FIELD_COMPLETED' => 'completed',
             'FIELD_ANONYMOUS' => 'anonymous',
-            'FIELD_DISABLE_COMMENTS' => 'disable_comments',
+            'FIELD_ALLOW_COMMENTS' => 'allow_comments',
             'FIELDS_WITH_KEYWORDS' => 'auto', // can be 'auto', array of fields or comma separated string of field names, works only when OBJECT_METATAGS is specified
             'FIELDS_DELAYED_PROCESSING' => 'videos', // can be array of fields or comma separated string of field names
 

+ 3 - 3
modules/boonex/tasks/classes/BxTasksModule.php

@@ -20,7 +20,7 @@ class BxTasksModule extends BxBaseModTextModule implements iBxDolCalendarService
         $CNF = &$this->_oConfig->CNF;
         $this->_aSearchableNamesExcept = array_merge($this->_aSearchableNamesExcept, array(
             $CNF['FIELD_PUBLISHED'],
-            $CNF['FIELD_DISABLE_COMMENTS']
+            $CNF['FIELD_ALLOW_COMMENTS']
         ));
     }
 	
@@ -443,7 +443,7 @@ class BxTasksModule extends BxBaseModTextModule implements iBxDolCalendarService
     {
         $CNF = &$this->_oConfig->CNF;
         $aContentInfo = $this->_oDb->getContentInfoById($iContentId);
-        if ($aContentInfo[$CNF['FIELD_DISABLE_COMMENTS']] == 1)
+        if ($aContentInfo[$CNF['FIELD_ALLOW_COMMENTS']] == 0)
             return false;
 
         return parent::serviceCheckAllowedCommentsTask($iContentId, $sObjectComments);
@@ -453,7 +453,7 @@ class BxTasksModule extends BxBaseModTextModule implements iBxDolCalendarService
     {
         $CNF = &$this->_oConfig->CNF;
         $aContentInfo = $this->_oDb->getContentInfoById($iContentId);
-        if ($aContentInfo[$CNF['FIELD_DISABLE_COMMENTS']] == 1)
+        if ($aContentInfo[$CNF['FIELD_ALLOW_COMMENTS']] == 0)
             return false;
 
         return parent::serviceCheckAllowedCommentsView($iContentId, $sObjectComments);

+ 2 - 2
modules/boonex/tasks/install/langs/en.xml

@@ -62,8 +62,8 @@
     <string name="_bx_tasks_form_entry_input_date_published"><![CDATA[Publishing time]]></string>
     <string name="_bx_tasks_form_entry_input_date_published_info"><![CDATA[Leave empty to publish immediately.]]></string>
     <string name="_bx_tasks_form_entry_input_sys_attachments"><![CDATA[Attachments]]></string>
-    <string name="_bx_tasks_form_entry_input_sys_disable_comments"><![CDATA[Disable comments]]></string>
-    <string name="_bx_tasks_form_entry_input_disable_comments"><![CDATA[Disable comments]]></string>
+    <string name="_bx_tasks_form_entry_input_sys_allow_comments"><![CDATA[Allow comments]]></string>
+    <string name="_bx_tasks_form_entry_input_allow_comments"><![CDATA[Allow comments]]></string>
 	
 	<string name="_bx_tasks_form_entry_input_sys_tasks_list"><![CDATA[Task list]]></string>
 	<string name="_bx_tasks_form_entry_input_tasks_list"><![CDATA[Task list]]></string>

+ 2 - 2
modules/boonex/tasks/install/sql/install.sql

@@ -28,7 +28,7 @@ CREATE TABLE IF NOT EXISTS `bx_tasks_tasks` (
   `completed` tinyint(4) NOT NULL DEFAULT '0', 
   `expired` tinyint(4) NOT NULL DEFAULT '0', 
   `allow_view_to` varchar(16) NOT NULL DEFAULT '3',
-  `disable_comments` tinyint(4) NOT NULL DEFAULT '0',
+  `allow_comments` tinyint(4) NOT NULL DEFAULT '1',
   `status` enum('active','awaiting','failed','hidden') NOT NULL DEFAULT 'active',
   `status_admin` enum('active','hidden','pending') NOT NULL DEFAULT 'active',
   PRIMARY KEY (`id`),
@@ -384,7 +384,7 @@ INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `ch
 ('bx_tasks', 'bx_tasks', 'attachments', '', '', 0, 'custom', '_bx_tasks_form_entry_input_sys_attachments', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_tasks', 'bx_tasks', 'labels', '', '', 0, 'custom', '_sys_form_input_sys_labels', '_sys_form_input_labels', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_tasks', 'bx_tasks', 'anonymous', '', '', 0, 'switcher', '_sys_form_input_sys_anonymous', '_sys_form_input_anonymous', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
-('bx_tasks', 'bx_tasks', 'disable_comments', '1', '', 0, 'switcher', '_bx_tasks_form_entry_input_sys_disable_comments', '_bx_tasks_form_entry_input_disable_comments', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0);
+('bx_tasks', 'bx_tasks', 'allow_comments', '1', '', 1, 'switcher', '_bx_tasks_form_entry_input_sys_allow_comments', '_bx_tasks_form_entry_input_allow_comments', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0);
 
 INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES 
 ('bx_tasks_entry_add', 'delete_confirm', 2147483647, 0, 1),