From 527a054952f48b350641b82f4bd6d37390b54d0a Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 14 Dec 2009 13:51:57 +0000 Subject: - Patch #644648 by sun: cleaned up, documented, and corrected some ['#token'] code. --- modules/comment/comment.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/comment/comment.module') 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( -- cgit v1.2.3