summaryrefslogtreecommitdiff
path: root/modules/comment/comment.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-12-14 13:51:57 +0000
committerDries Buytaert <dries@buytaert.net>2009-12-14 13:51:57 +0000
commit527a054952f48b350641b82f4bd6d37390b54d0a (patch)
tree0e4ca56524bba92ce492257ecfaa712d443234ae /modules/comment/comment.module
parent516d24d1cd880c9ee6ccab195fd50d90c6f74e13 (diff)
downloadbrdo-527a054952f48b350641b82f4bd6d37390b54d0a.tar.gz
brdo-527a054952f48b350641b82f4bd6d37390b54d0a.tar.bz2
- Patch #644648 by sun: cleaned up, documented, and corrected some ['#token'] code.
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r--modules/comment/comment.module2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 18e0e67d0..9f018dba8 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -1845,7 +1845,7 @@ function comment_form($form, &$form_state, $comment) {
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Save'),
- '#access' => variable_get('comment_preview_' . $node->type, DRUPAL_OPTIONAL) != DRUPAL_REQUIRED || (!form_get_errors() && isset($form_state['comment_preview'])),
+ '#access' => ($comment->cid && user_access('administer comments')) || variable_get('comment_preview_' . $node->type, DRUPAL_OPTIONAL) != DRUPAL_REQUIRED || (!form_get_errors() && isset($form_state['comment_preview'])),
'#weight' => 19,
);
$form['preview'] = array(