diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-12-04 01:51:09 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-12-04 01:51:09 +0000 |
commit | 74e5b8aba2c62ad9eece3315dcf5b325a73cf329 (patch) | |
tree | 3653c0e270ba52593f8a39fa21a73cea89f0fff2 /modules/comment/comment.module | |
parent | 2d1693648d21b0c3d4509f396e1a6316a4445d0c (diff) | |
download | brdo-74e5b8aba2c62ad9eece3315dcf5b325a73cf329.tar.gz brdo-74e5b8aba2c62ad9eece3315dcf5b325a73cf329.tar.bz2 |
#974072 by Damien Tournoud: Fixed Comment publish / unpublish actions are broken
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r-- | modules/comment/comment.module | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 2eebcfb7b..4ccc6b65b 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -2508,13 +2508,13 @@ function comment_action_info() { * @ingroup actions */ function comment_publish_action($comment, $context = array()) { - if (isset($comment->comment)) { + if (isset($comment->subject)) { $subject = $comment->subject; $comment->status = COMMENT_PUBLISHED; } else { $cid = $context['cid']; - $subject = db_query('SELECT subject FROM {comment} WHERE cid = :cid', array(':cid', $cid))->fetchField(); + $subject = db_query('SELECT subject FROM {comment} WHERE cid = :cid', array(':cid' => $cid))->fetchField(); db_update('comment') ->fields(array('status' => COMMENT_PUBLISHED)) ->condition('cid', $cid) @@ -2535,13 +2535,13 @@ function comment_publish_action($comment, $context = array()) { * @ingroup actions */ function comment_unpublish_action($comment, $context = array()) { - if (isset($comment->comment)) { + if (isset($comment->subject)) { $subject = $comment->subject; $comment->status = COMMENT_NOT_PUBLISHED; } else { $cid = $context['cid']; - $subject = db_query('SELECT subject FROM {comment} WHERE cid = :cid', array(':cid', $cid))->fetchField(); + $subject = db_query('SELECT subject FROM {comment} WHERE cid = :cid', array(':cid' => $cid))->fetchField(); db_update('comment') ->fields(array('status' => COMMENT_NOT_PUBLISHED)) ->condition('cid', $cid) |