summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-08-02 20:29:43 +0000
committerDries Buytaert <dries@buytaert.net>2008-08-02 20:29:43 +0000
commitaade5fbf2454fd540c48c7e1cf7abad8479b9f5f (patch)
tree3d282ac1d7ff70a0d07ce96aa388787312ec0601 /modules
parente1dd1e3482738205984df293de074d6ac424aad3 (diff)
downloadbrdo-aade5fbf2454fd540c48c7e1cf7abad8479b9f5f.tar.gz
brdo-aade5fbf2454fd540c48c7e1cf7abad8479b9f5f.tar.bz2
- Patch #237636 by marcingy: comment status field should match node status field.
Diffstat (limited to 'modules')
-rw-r--r--modules/comment/comment.install16
-rw-r--r--modules/comment/comment.module8
2 files changed, 18 insertions, 6 deletions
diff --git a/modules/comment/comment.install b/modules/comment/comment.install
index cc1ea7353..96f0e3dca 100644
--- a/modules/comment/comment.install
+++ b/modules/comment/comment.install
@@ -97,6 +97,18 @@ function comment_update_7000() {
}
/**
+ * Change comment status from published being 0 to being 1
+ */
+function comment_update_7001() {
+ $ret = array();
+ $ret[] = update_sql("UPDATE {comments} SET status = 3 WHERE status = 0");
+ $ret[] = update_sql("UPDATE {comments} SET status = 0 WHERE status = 1");
+ $ret[] = update_sql("UPDATE {comments} SET status = 1 WHERE status = 3");
+
+ return $ret;
+}
+
+/**
* @} End of "defgroup updates-6.x-to-7.x"
* The next series of updates should start at 8000.
*/
@@ -161,9 +173,9 @@ function comment_schema() {
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
- 'default' => 0,
+ 'default' => 1,
'size' => 'tiny',
- 'description' => t('The published status of a comment. (0 = Published, 1 = Not Published)'),
+ 'description' => t('The published status of a comment. (0 = Not Published, 1 = Published)'),
),
'format' => array(
'type' => 'int',
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index ef03a0550..692f5d2df 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -11,14 +11,14 @@
*/
/**
- * Comment is published.
+ * Comment is awaiting approval.
*/
-define('COMMENT_PUBLISHED', 0);
+define('COMMENT_NOT_PUBLISHED', 0);
/**
- * Comment is awaiting approval.
+ * Comment is published.
*/
-define('COMMENT_NOT_PUBLISHED', 1);
+define('COMMENT_PUBLISHED', 1);
/**
* Comments are displayed in a flat list - collapsed.