X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Finclude%2Fclass_management.inc;h=89f56c163272f825930a41461e8eee52dc472ca4;hb=6ac95cb185bd87219075cd798784ba7b8d792eac;hp=b15a124623ef4f417141566efd8d290a03d62a5b;hpb=584a608332a5162c24b0a5c695d28e95da9455ec;p=gosa.git diff --git a/gosa-core/include/class_management.inc b/gosa-core/include/class_management.inc index b15a12462..89f56c163 100644 --- a/gosa-core/include/class_management.inc +++ b/gosa-core/include/class_management.inc @@ -121,6 +121,10 @@ class management $this->registerAction("cancelSnapshot","closeDialogs"); $this->registerAction("config-filter","editFilter"); + $this->registerAction("saveFilter","saveFilter"); + + // To temporay disable the filter caching UNcomment this line. + #session::global_un_set(get_class($this)."_filter"); } /*! \brief Execute this plugin @@ -132,6 +136,8 @@ class management $vars = array('/^act$/','/^listing/','/^PID$/','/^FILTER_PID$/'); session::set('LOCK_VARS_TO_USE',$vars); + pathNavigator::registerPlugin($this); + /* Display the copy & paste dialog, if it is currently open */ $ret = $this->copyPasteHandler("",array()); if($ret){ @@ -248,13 +254,13 @@ class management // Display ok, (apply) and cancel buttons $str.= "

\n"; - $str.= "\n"; + $str.= "\n"; $str.= " \n"; if($this->displayApplyBtn){ - $str.= "\n"; + $str.= "\n"; $str.= " \n"; } - $str.= "\n"; + $str.= "\n"; $str.= "

"; } return($str); @@ -372,7 +378,7 @@ class management if(isset($_POST['edit_cancel'])) $action['action'] = "cancel"; if(isset($_POST['delete_confirmed'])) $action['action'] = "removeConfirmed"; if(isset($_POST['delete_cancel'])) $action['action'] = "cancelDelete"; - if(isset($_POST['saveFilter'])) $action['action'] = "save"; + if(isset($_POST['saveFilter'])) $action['action'] = "saveFilter"; if(isset($_POST['cancelFilter'])) $action['action'] = "cancel"; // Detect Snapshot actions @@ -685,6 +691,28 @@ class management } + /*! \brief Save filter modifcations. + */ + protected function saveFilter() + { + if($this->dialogObject instanceOf userFilter){ + $msgs = $this->dialogObject->check(); + if(count($msgs)){ + msg_dialog::displayChecks($msgs); + return(""); + }else{ + $this->dialogObject->save(); + @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,$this->dns,"Entry saved!"); + $this->remove_lock(); + $this->closeDialogs(); + + // Ask filter to reload information + $this->filter->reloadFilters(); + } + } + } + + /*! \brief Save object modifications and closes dialogs (returns to object listing). * - Calls '::check' to validate the given input. * - Calls '::save' to save back object modifications (e.g. to ldap).