Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
782b1cfb
Commit
782b1cfb
authored
Nov 30, 2011
by
catch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#1315008
by bfroehle: Remove unnecessary validation in user/node list filtering.
parent
9988cc61
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
12 deletions
+2
-12
core/modules/node/node.admin.inc
core/modules/node/node.admin.inc
+1
-6
core/modules/user/user.admin.inc
core/modules/user/user.admin.inc
+1
-6
No files found.
core/modules/node/node.admin.inc
View file @
782b1cfb
...
...
@@ -242,12 +242,7 @@ function node_filter_form_submit($form, &$form_state) {
// Apply every filter that has a choice selected other than 'any'.
foreach
(
$filters
as
$filter
=>
$options
)
{
if
(
isset
(
$form_state
[
'values'
][
$filter
])
&&
$form_state
[
'values'
][
$filter
]
!=
'[any]'
)
{
// Flatten the options array to accommodate hierarchical/nested options.
$flat_options
=
form_options_flatten
(
$filters
[
$filter
][
'options'
]);
// Only accept valid selections offered on the dropdown, block bad input.
if
(
isset
(
$flat_options
[
$form_state
[
'values'
][
$filter
]]))
{
$_SESSION
[
'node_overview_filter'
][]
=
array
(
$filter
,
$form_state
[
'values'
][
$filter
]);
}
$_SESSION
[
'node_overview_filter'
][]
=
array
(
$filter
,
$form_state
[
'values'
][
$filter
]);
}
}
break
;
...
...
core/modules/user/user.admin.inc
View file @
782b1cfb
...
...
@@ -115,12 +115,7 @@ function user_filter_form_submit($form, &$form_state) {
// Apply every filter that has a choice selected other than 'any'.
foreach
(
$filters
as
$filter
=>
$options
)
{
if
(
isset
(
$form_state
[
'values'
][
$filter
])
&&
$form_state
[
'values'
][
$filter
]
!=
'[any]'
)
{
// Merge an array of arrays into one if necessary.
$options
=
(
$filter
==
'permission'
)
?
form_options_flatten
(
$filters
[
$filter
][
'options'
])
:
$filters
[
$filter
][
'options'
];
// Only accept valid selections offered on the dropdown, block bad input.
if
(
isset
(
$options
[
$form_state
[
'values'
][
$filter
]]))
{
$_SESSION
[
'user_overview_filter'
][]
=
array
(
$filter
,
$form_state
[
'values'
][
$filter
]);
}
$_SESSION
[
'user_overview_filter'
][]
=
array
(
$filter
,
$form_state
[
'values'
][
$filter
]);
}
}
break
;
...
...
Write
Preview
Markdown
is supported
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