- Patch #237636 by marcingy: comment status field should match node status field.

merge-requests/26/head
Dries Buytaert 2008-08-02 20:29:43 +00:00
parent e1dd1e3482
commit aade5fbf24
2 changed files with 20 additions and 8 deletions

View File

@ -96,6 +96,18 @@ function comment_update_7000() {
return array(array('success' => TRUE, 'query' => 'Comment order settings removed.'));
}
/**
* 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',

View File

@ -10,15 +10,15 @@
* a forum topic, weblog post, story, collaborative book page, etc.
*/
/**
* Comment is published.
*/
define('COMMENT_PUBLISHED', 0);
/**
* Comment is awaiting approval.
*/
define('COMMENT_NOT_PUBLISHED', 1);
define('COMMENT_NOT_PUBLISHED', 0);
/**
* Comment is published.
*/
define('COMMENT_PUBLISHED', 1);
/**
* Comments are displayed in a flat list - collapsed.