Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3485117
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3485117
Commits
a92aff94
Commit
a92aff94
authored
17 years ago
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
- Patch
#145177
by asimmonds: drupal_execute fixes.
parent
6102d02d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
includes/form.inc
+5
-12
5 additions, 12 deletions
includes/form.inc
with
5 additions
and
12 deletions
includes/form.inc
+
5
−
12
View file @
a92aff94
...
...
@@ -183,13 +183,6 @@ function drupal_get_form($form_id) {
*/
function
drupal_execute
(
$form_id
,
&
$form_state
)
{
$args
=
func_get_args
();
// We do a bit of juggling here because drupal_retrieve_form() expects
// the $form_state to be the last parameter, while drupal_execute()
// always takes it in as the second parameter.
$args
=
array_slice
(
$args
,
3
);
$args
[
1
]
=
$form_state
;
$form
=
call_user_func_array
(
'drupal_retrieve_form'
,
$args
);
$form
[
'#post'
]
=
$form_state
[
'values'
];
drupal_prepare_form
(
$form_id
,
$form
,
$form_state
);
...
...
@@ -294,7 +287,7 @@ function drupal_process_form($form_id, &$form, &$form_state) {
// We'll clear out the cached copies of the form and its stored data
// here, as we've finished with them. The in-memory copies are still
// here, though.
if
(
variable_get
(
'cache'
,
CACHE_DISABLED
)
==
CACHE_DISABLED
)
{
if
(
variable_get
(
'cache'
,
CACHE_DISABLED
)
==
CACHE_DISABLED
&&
!
empty
(
$form_state
[
'values'
][
'form_build_id'
])
)
{
cache_clear_all
(
'form_'
.
$form_state
[
'values'
][
'form_build_id'
],
'cache_form'
);
cache_clear_all
(
'storage_'
.
$form_state
[
'values'
][
'form_build_id'
],
'cache_form'
);
}
...
...
@@ -709,6 +702,10 @@ function form_builder($form_id, $form, &$form_state) {
$form
+=
$info
;
}
if
(
isset
(
$form
[
'#type'
])
&&
$form
[
'#type'
]
==
'form'
&&
!
empty
(
$form
[
'#programmed'
]))
{
$form_state
[
'submitted'
]
=
TRUE
;
}
if
(
isset
(
$form
[
'#input'
])
&&
$form
[
'#input'
])
{
_form_builder_handle_input_element
(
$form_id
,
$form
,
$form_state
);
}
...
...
@@ -773,10 +770,6 @@ function form_builder($form_id, $form, &$form_state) {
* attached to a specific element.
*/
function
_form_builder_handle_input_element
(
$form_id
,
&
$form
,
&
$form_state
)
{
if
(
isset
(
$form
[
'#type'
])
&&
$form
[
'#type'
]
==
'form'
&&
!
empty
(
$form
[
'#programmed'
]))
{
$form_state
[
'submitted'
]
=
TRUE
;
}
if
(
!
isset
(
$form
[
'#name'
]))
{
$name
=
array_shift
(
$form
[
'#parents'
]);
$form
[
'#name'
]
=
$name
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment