summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaren Stevenson2011-01-17 17:16:47 (GMT)
committer Karen Stevenson2011-01-17 17:16:47 (GMT)
commit8bd4781242069f308472166032d15948cfbdb61b (patch)
tree7c9b7afd215bdd6cdf81150e047757c4eb0ac786
parent17aae57b270487265dad5dac964a8fc14862e1f8 (diff)
#447868 Figure out when remembered value needs to used in Date filter.
-rw-r--r--date_views/includes/date_views_filter_handler.inc7
1 files changed, 7 insertions, 0 deletions
diff --git a/date_views/includes/date_views_filter_handler.inc b/date_views/includes/date_views_filter_handler.inc
index 23220ab..be10d77 100644
--- a/date_views/includes/date_views_filter_handler.inc
+++ b/date_views/includes/date_views_filter_handler.inc
@@ -322,6 +322,13 @@ class date_views_filter_handler extends views_handler_filter_numeric {
if (empty($options)) {
$options = $this->options;
}
+
+ // If this is a remembered value, use the value from the SESSION.
+ if (!empty($this->options['expose']['remember'])) {
+ $display_id = ($this->view->display_handler->is_defaulted('filters')) ? 'default' : $this->view->current_display;
+ return $_SESSION['views'][$this->view->name][$display_id]['date_filter'][$prefix];
+ }
+
// This is a date that needs to be constructed from options like 'now' .
$default_option = $prefix == 'max' ? $options['default_to_date'] : $options['default_date'];
if (!empty($default_option)) {