diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-09-25 14:58:43 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-09-25 14:58:43 +0000 |
commit | cd517f16e9f8884fc811d54f546878c09fdc1791 (patch) | |
tree | 01ea7aa16dffd4781251a3ef4c1067b4d7c1d5fa /modules/comment | |
parent | 216322ac98d2298a016ff682e7bc9356147d85f5 (diff) | |
download | brdo-cd517f16e9f8884fc811d54f546878c09fdc1791.tar.gz brdo-cd517f16e9f8884fc811d54f546878c09fdc1791.tar.bz2 |
#177927 by chx: use path=/ in PHP comment settings cookie creation, so cookies set around the site are available in other 'directories'
Diffstat (limited to 'modules/comment')
-rw-r--r-- | modules/comment/comment.module | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 59264a41c..20f979fee 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -837,7 +837,7 @@ function comment_save($edit) { if ($edit['uid'] === $user->uid) { // '===' because we want to modify anonymous users too $edit['name'] = $user->name; } - + db_query("INSERT INTO {comments} (nid, pid, uid, subject, comment, format, hostname, timestamp, status, thread, name, mail, homepage) VALUES (%d, %d, %d, '%s', '%s', %d, '%s', %d, %d, '%s', '%s', '%s', '%s')", $edit['nid'], $edit['pid'], $edit['uid'], $edit['subject'], $edit['comment'], $edit['format'], ip_address(), $edit['timestamp'], $status, $thread, $edit['name'], $edit['mail'], $edit['homepage']); $edit['cid'] = db_last_insert_id('comments', 'cid'); @@ -1721,7 +1721,7 @@ function comment_form_validate($form, &$form_state) { foreach (array('name', 'homepage', 'mail') as $field) { // Set cookie for 365 days. if (isset($form_state['values'][$field])) { - setcookie('comment_info_'. $field, $form_state['values'][$field], time() + 31536000); + setcookie('comment_info_'. $field, $form_state['values'][$field], time() + 31536000, '/'); } } } |