diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-05-17 20:57:19 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-05-17 20:57:19 +0000 |
commit | d1e28d4273e8063d8ce8d420fc398424d637100c (patch) | |
tree | fe0be71c7ecaee2ecff4a3798d444c5da4d9af21 /modules/comment/comment.module | |
parent | 8cc8f878966eea0475b8dbbdff74f7c596f688ac (diff) | |
download | brdo-d1e28d4273e8063d8ce8d420fc398424d637100c.tar.gz brdo-d1e28d4273e8063d8ce8d420fc398424d637100c.tar.bz2 |
- Patch #141131 by mfer: remember anonyous comment posters.
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r-- | modules/comment/comment.module | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 91b02a43b..5adcdd498 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1458,6 +1458,10 @@ function comment_form($edit, $title = NULL) { $op = isset($_POST['op']) ? $_POST['op'] : ''; + if (!$user->uid && variable_get('comment_anonymous', COMMENT_ANONYMOUS_MAYNOT_CONTACT) != COMMENT_ANONYMOUS_MAYNOT_CONTACT) { + drupal_add_js(drupal_get_path('module', 'comment') . '/comment.js'); + } + if ($user->uid) { if (!empty($edit['cid']) && user_access('administer comments')) { if (!empty($edit['author'])) { @@ -1681,6 +1685,10 @@ function comment_form_add_preview($form, $edit, &$form_state) { } function comment_form_validate($form_values, $form, &$form_state) { + foreach (array('name', 'homepage', 'mail') as $field) { + //set cookie for 365 days + setrawcookie('comment_info_' . $field, rawurlencode($form_values[$field]), time() + 31536000); + } comment_validate($form_values); } |