function views_plugin_exposed_form::reset_form in Views (for Drupal 7) 6.3
Same name and namespace in other branches
- 7.3 plugins/views_plugin_exposed_form.inc \views_plugin_exposed_form::reset_form()
Provide a reset form if one was requested.
1 call to views_plugin_exposed_form::reset_form()
- views_plugin_exposed_form::exposed_form_submit in plugins/
views_plugin_exposed_form.inc - This function is executed when exposed form is submited.
File
- plugins/
views_plugin_exposed_form.inc, line 276
Class
- views_plugin_exposed_form
- The base plugin to handle exposed filter forms.
Code
function reset_form(&$form, &$form_state) {
// If filters are not overridden, store the 'remember' settings on the
// default display. If they are, store them on this display. This way,
// multiple displays in the same view can share the same filters and
// remember settings.
$display_id = $this->view->display_handler
->is_defaulted('filters') ? 'default' : $this->view->current_display;
unset($_SESSION['views'][$this->view->name][$display_id]);
$form_state['no_redirect'] = FALSE;
$form_state['redirect'] = !empty($this->view->ajax_path) ? $this->view->ajax_path : $_GET['q'];
}