From 17549b48bdd58dab9526397972578e661b81c352 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 28 Apr 2008 12:52:21 +0000 Subject: [PATCH] Updated deployment addon -Remember filter settings. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10712 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../goto/addons/goto/class_gotomasses.inc | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/gosa-plugins/goto/addons/goto/class_gotomasses.inc b/gosa-plugins/goto/addons/goto/class_gotomasses.inc index fc2c14c5a..cd1c02223 100644 --- a/gosa-plugins/goto/addons/goto/class_gotomasses.inc +++ b/gosa-plugins/goto/addons/goto/class_gotomasses.inc @@ -40,7 +40,7 @@ class gotomasses extends plugin var $event_tags = array(); var $sort_by = "Schedule"; - var $sort_dir = "down"; + var $sort_dir = "up"; var $entries = array(); var $range = 25; var $start = 0; @@ -57,6 +57,20 @@ class gotomasses extends plugin foreach($this->events['SCHEDULED'] as $evt){ $this->event_tags[] = $evt['s_Queued_Action']; } + + /* Load filter settings */ + if(!session::is_set("gotomasses_filter")){ + $gotomasses_filter = + array( + "range" => $this->range, + "sort_by" => $this->sort_by, + "sort_dir" => $this->sort_dir); + session::set("gotomasses_filter",$gotomasses_filter); + } + $gotomasses_filter = session::get("gotomasses_filter"); + foreach(array("range","sort_by","sort_dir") as $attr) { + $this->$attr = $gotomasses_filter[$attr]; + } } @@ -759,7 +773,14 @@ class gotomasses extends plugin if(isset($_POST['range']) && is_numeric($_POST['range'])){ $this->range = $_POST['range']; } - + + /* Save filter settings */ + $gotomasses_filter = session::get("gotomasses_filter"); + foreach(array("range","sort_by","sort_dir") as $attr){ + $gotomasses_filter[$attr] = $this->$attr; + } + session::set("gotomasses_filter",$gotomasses_filter); + /* Page changed. */ if(isset($_GET['start'])){ $start = $_GET['start']; -- 2.30.2