diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-10-09 17:05:52 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-10-09 17:05:52 +0000 |
commit | 67ddd3e7f3ca7fc0d797d8b4fd43b9d601b882e7 (patch) | |
tree | 4cc170588f9578205e8b542d6b9d08794c3df968 | |
parent | 1b9cde9d85b2c04df35b04cfbd12f68243a118bc (diff) | |
download | brdo-67ddd3e7f3ca7fc0d797d8b4fd43b9d601b882e7.tar.gz brdo-67ddd3e7f3ca7fc0d797d8b4fd43b9d601b882e7.tar.bz2 |
- Patch #585838 by sun: quick fix for {comment}.status being broken.
-rw-r--r-- | modules/comment/comment.module | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index d3facf4c6..ea28d5417 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -96,7 +96,7 @@ function comment_help($path, $arg) { } /** - * Implement hook_entity_info() { + * Implement hook_entity_info(). */ function comment_entity_info() { $return = array( @@ -1493,7 +1493,7 @@ class CommentController extends DrupalDefaultEntityController { $this->query->addField('n', 'type', 'node_type'); $this->query->innerJoin('users', 'u', 'base.uid = u.uid'); $this->query->addField('u', 'name', 'registered_name'); - $this->query->fields('u', array( 'uid', 'signature', 'picture', 'data', 'status')); + $this->query->fields('u', array('uid', 'signature', 'picture', 'data')); } protected function attachLoad(&$comments) { @@ -1665,11 +1665,11 @@ function comment_form($form, &$form_state, $comment) { $author = $comment->registered_name; } - if (!empty($comment->status)) { + if (isset($comment->status)) { $status = $comment->status; } else { - $status = 0; + $status = COMMENT_NOT_PUBLISHED; } if (!empty($comment->date)) { @@ -1742,8 +1742,8 @@ function comment_form($form, &$form_state, $comment) { '#type' => 'radios', '#parents' => array('status'), '#title' => t('Status'), - '#default_value' => $status, - '#options' => array(t('Not published'), t('Published')), + '#default_value' => $status, + '#options' => array(COMMENT_NOT_PUBLISHED => t('Not published'), COMMENT_PUBLISHED => t('Published')), '#weight' => -1, ); } |