diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-10-16 15:54:33 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-10-16 15:54:33 +0000 |
commit | f46e6626cd5274f1783fb2f6e0e776b8b43b1a5c (patch) | |
tree | 794eabc8e59750d9581f4928d08900f15142818f /modules | |
parent | bac6eed5ffa6c64d33c5c4bbd419336f0ca703db (diff) | |
download | brdo-f46e6626cd5274f1783fb2f6e0e776b8b43b1a5c.tar.gz brdo-f46e6626cd5274f1783fb2f6e0e776b8b43b1a5c.tar.bz2 |
- Patch #440876 by Dave Reid, sun: reuse comment.module's anonymous cookie information.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/comment/comment.module | 2 | ||||
-rw-r--r-- | modules/contact/contact.pages.inc | 4 | ||||
-rw-r--r-- | modules/user/user.module | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 8dca3845e..b38f6381b 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1645,7 +1645,7 @@ function comment_form($form, &$form_state, $comment) { if (!$user->uid && variable_get('comment_anonymous_' . $node->type, COMMENT_ANONYMOUS_MAYNOT_CONTACT) != COMMENT_ANONYMOUS_MAYNOT_CONTACT) { $form['#attached']['library'][] = array('system', 'cookie'); - $form['#attached']['js'][] = drupal_get_path('module', 'comment') . '/comment.js'; + $form['#attributes']['class'][] = 'user-info-from-cookie'; } $comment = (array) $comment; diff --git a/modules/contact/contact.pages.inc b/modules/contact/contact.pages.inc index 7248303d6..2855bec83 100644 --- a/modules/contact/contact.pages.inc +++ b/modules/contact/contact.pages.inc @@ -50,7 +50,7 @@ function contact_site_form($form, &$form_state) { if (!$user->uid) { $form['#attached']['library'][] = array('system', 'cookie'); - $form['#attached']['js'][] = drupal_get_path('module', 'contact') . '/contact.js'; + $form['#attributes']['class'][] = 'user-info-from-cookie'; } $form['#token'] = $user->uid ? $user->name . $user->mail : ''; @@ -178,7 +178,7 @@ function contact_personal_form($form, &$form_state, stdClass $recipient) { if (!$user->uid) { $form['#attached']['library'][] = array('system', 'cookie'); - $form['#attached']['js'][] = drupal_get_path('module', 'contact') . '/contact.js'; + $form['#attributes']['class'][] = 'user-info-from-cookie'; } $form['#token'] = $user->uid ? $user->name . $user->mail : ''; diff --git a/modules/user/user.module b/modules/user/user.module index ca787e054..fe75f1c7b 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -3068,6 +3068,9 @@ function user_register_form($form, &$form_state) { $form['#user'] = drupal_anonymous_user(); $form['#user_category'] = 'register'; + $form['#attached']['library'][] = array('system', 'cookie'); + $form['#attributes']['class'][] = 'user-info-from-cookie'; + // Start with the default user account fields. user_account_form($form, $form_state); |