Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
556ef56c
Commit
556ef56c
authored
May 29, 2007
by
Dries
Browse files
- Patch
#147417
by robertDouglas: only save cookie for anonymous users.
parent
d80ec0f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/comment/comment.module
View file @
556ef56c
...
...
@@ -1685,9 +1685,12 @@ function comment_form_add_preview($form, $edit, &$form_state) {
}
function
comment_form_validate
(
$form
,
&
$form_state
,
$form_values
)
{
foreach
(
array
(
'name'
,
'homepage'
,
'mail'
)
as
$field
)
{
//set cookie for 365 days
setcookie
(
'comment_info_'
.
$field
,
$form_values
[
$field
],
time
()
+
31536000
);
global
$user
;
if
(
$user
->
uid
===
0
)
{
foreach
(
array
(
'name'
,
'homepage'
,
'mail'
)
as
$field
)
{
//set cookie for 365 days
setcookie
(
'comment_info_'
.
$field
,
$form_values
[
$field
],
time
()
+
31536000
);
}
}
comment_validate
(
$form_values
);
}
...
...
@@ -2075,4 +2078,3 @@ function int2vancode($i = 0) {
function
vancode2int
(
$c
=
'00'
)
{
return
base_convert
(
substr
(
$c
,
1
),
36
,
10
);
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment