diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/comment/comment.module | 2 | ||||
-rw-r--r-- | modules/contact/contact.pages.inc | 4 |
2 files changed, 2 insertions, 4 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( diff --git a/modules/contact/contact.pages.inc b/modules/contact/contact.pages.inc index fcf3d6e2e..3dd4c3e47 100644 --- a/modules/contact/contact.pages.inc +++ b/modules/contact/contact.pages.inc @@ -61,7 +61,6 @@ function contact_site_form($form, &$form_state) { $form['#attributes']['class'][] = 'user-info-from-cookie'; } - $form['#token'] = $user->uid ? $user->name . $user->mail : ''; $form['name'] = array( '#type' => 'textfield', '#title' => t('Your name'), @@ -171,7 +170,7 @@ function contact_site_form_submit($form, &$form_state) { * @see contact_personal_form_validate() * @see contact_personal_form_submit() */ -function contact_personal_form($form, &$form_state, stdClass $recipient) { +function contact_personal_form($form, &$form_state, $recipient) { global $user; // Check if flood control has been activated for sending e-mails. @@ -190,7 +189,6 @@ function contact_personal_form($form, &$form_state, stdClass $recipient) { $form['#attributes']['class'][] = 'user-info-from-cookie'; } - $form['#token'] = $user->uid ? $user->name . $user->mail : ''; $form['recipient'] = array( '#type' => 'value', '#value' => $recipient, |