Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
7645a1f4
Commit
7645a1f4
authored
Jul 19, 2006
by
Neil Drumm
Browse files
#73609
by jvandyk, add a comment explaining token unsetting.
parent
c11c1c28
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/form.inc
View file @
7645a1f4
...
...
@@ -71,6 +71,9 @@ function drupal_get_form($form_id, &$form, $callback = NULL) {
$form
[
'#type'
]
=
'form'
;
if
(
isset
(
$form
[
'#token'
]))
{
// If the page cache is on and an anonymous user issues a GET request,
// unset the token because the token in the cached page would not match,
// because the token is based on the session ID.
if
(
variable_get
(
'cache'
,
0
)
&&
!
$user
->
uid
&&
$_SERVER
[
'REQUEST_METHOD'
]
==
'GET'
)
{
unset
(
$form
[
'#token'
]);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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