function node_filter_form_submit
Form submission handler for node_filter_form().
See also
node_multiple_delete_confirm()
node_multiple_delete_confirm_submit()
1 string reference to 'node_filter_form_submit'
- node_admin_content in modules/
node/ node.admin.inc - Page callback: Form constructor for the content administration form.
File
-
modules/
node/ node.admin.inc, line 239
Code
function node_filter_form_submit($form, &$form_state) {
$filters = node_filters();
switch ($form_state['values']['op']) {
case t('Filter'):
case t('Refine'):
// 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],
);
}
}
}
break;
case t('Undo'):
array_pop($_SESSION['node_overview_filter']);
break;
case t('Reset'):
$_SESSION['node_overview_filter'] = array();
break;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.