From f5b9f24c1c352f50488ab8ec5a89dff873e75bea Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 7 Sep 2010 10:59:21 +0000 Subject: [PATCH] Updated filter handling git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19545 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../personal/groupware/class_filterManager.inc | 12 +++++++----- .../personal/groupware/class_groupware.inc | 14 ++++++++++++-- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/gosa-plugins/groupware/personal/groupware/class_filterManager.inc b/gosa-plugins/groupware/personal/groupware/class_filterManager.inc index afa3245e4..b5101ac1c 100644 --- a/gosa-plugins/groupware/personal/groupware/class_filterManager.inc +++ b/gosa-plugins/groupware/personal/groupware/class_filterManager.inc @@ -3,7 +3,6 @@ class filterManager extends plugin{ var $filterListing = NULL; - var $filterRules = array(); var $filterEditor = NULL; function __construct($config,$parent,$rules) @@ -12,7 +11,7 @@ class filterManager extends plugin{ $this->parent = &$parent; - $this->filterRules = $rules; + $this->filter = $rules; $this->filterListing= new sortableListing(); $this->filterListing->setDeleteable(true); $this->filterListing->setEditable(true); @@ -20,9 +19,6 @@ class filterManager extends plugin{ $this->filterListing->setWidth("100%"); $this->filterListing->setHeight("150px;"); $this->filterListing->setAcl($this->parent->getacl('mailFilter')); - - - $this->filter = array(); } function execute() @@ -134,6 +130,12 @@ class filterManager extends plugin{ } } } + + + function save() + { + return($this->filter); + } } ?> diff --git a/gosa-plugins/groupware/personal/groupware/class_groupware.inc b/gosa-plugins/groupware/personal/groupware/class_groupware.inc index 3a1d53808..e816b0403 100644 --- a/gosa-plugins/groupware/personal/groupware/class_groupware.inc +++ b/gosa-plugins/groupware/personal/groupware/class_groupware.inc @@ -115,6 +115,16 @@ class groupware extends plugin ****************/ if(isset($_POST['filterManager_cancel'])) $this->filterManager = NULL; + if(isset($_POST['filterManager_ok'])){ + $this->filterManager->save_object(); + $msgs = $this->filterManager->check(); + if(count($msgs)){ + msg_dialog::displayChecks($msgs); + }else{ + $this->filterRules = $this->filterManager->save(); + $this->filterManager = NULL; + } + } if(isset($_POST['configureFilter'])){ $this->filterManager = new filterManager($this->config, $this,$this->filterRules); $this->filterManager->acl_base = $this->acl_base; @@ -512,8 +522,8 @@ class groupware extends plugin */ function check() { - $mssages = plugin::check(); - return($message); + $messages = plugin::check(); + return($messages); } -- 2.30.2