From 14dfbc96657cea7e656a12ad40885ff7c2060ad2 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 28 Feb 2008 10:52:51 +0000 Subject: [PATCH] Updated gotomasses. -Multiple update git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9184 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../addons/gotomasses/class_gotomasses.inc | 37 ++++++++++++++++--- 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/gosa-plugins/goto/addons/gotomasses/class_gotomasses.inc b/gosa-plugins/goto/addons/gotomasses/class_gotomasses.inc index 6a32d5ec7..8a8005598 100644 --- a/gosa-plugins/goto/addons/gotomasses/class_gotomasses.inc +++ b/gosa-plugins/goto/addons/gotomasses/class_gotomasses.inc @@ -43,9 +43,11 @@ class gotomasses extends plugin $s_entry = $s_action = ""; $arr = array( + "/^pause_/" => "pause", "/^resume_/" => "resume", "/^execute_process_/" => "execute_process", + "/^abort_process_/" => "abort_process", "/^prio_up_/" => "prio_up", "/^prio_down_/" => "prio_down", @@ -96,13 +98,21 @@ class gotomasses extends plugin if(preg_match("/^resume/",$s_action) || preg_match("/^pause/",$s_action) || + preg_match("/^abort_process/",$s_action) || preg_match("/^execute_process/",$s_action)){ switch($s_action){ - case 'resume' : $this->resume_queue_entries(array($s_entry));break; - case 'pause' : $this->pause_queue_entries (array($s_entry));break; - case 'execute_process': $this->execute_queue_entries (array($s_entry));break; - default : trigger_error("Undefined priority setting used."); + case 'resume' : $this->resume_queue_entries (array($s_entry));break; + case 'pause' : $this->pause_queue_entries (array($s_entry));break; + case 'execute_process': $this->execute_queue_entries (array($s_entry));break; + case 'abort_process' : $this->abort_queue_entries (array($s_entry));break; + + case 'resume_all' : $this->resume_queue_entries ($this->list_get_selected_items());break; + case 'pause_all' : $this->pause_queue_entries ($this->list_get_selected_items());break; + case 'execute_process_all': $this->execute_queue_entries ($this->list_get_selected_items());break; + case 'abort_process_all' : $this->abort_queue_entries ($this->list_get_selected_items());break; + + default : trigger_error("Undefined action setting used (".$s_action.")."); } if($this->o_queue->is_error()){ msg_dialog::display(_("Error"), $this->o_queue->get_error(), ERROR_DIALOG); @@ -259,8 +269,10 @@ class gotomasses extends plugin } if(preg_match("/w/",$this->getacl(""))){ $s.= "..|---|\n"; - $s.= "..| "._("Resume all")."|resume_all_\n"; - $s.= "..| "._("Pause all")."|pause_all_\n"; + $s.= "..| "._("Resume all")."|resume_all\n"; + $s.= "..| "._("Pause all")."|pause_all\n"; + $s.= "..| "._("Aboer all")."|abort_process_all\n"; + $s.= "..| "._("Execute all")."|execute_process_all\n"; } $divlist->SetDropDownHeaderMenu($s); @@ -467,6 +479,19 @@ class gotomasses extends plugin } + /*! \brief Force queue job to be done as far as possible. + * @return Boolean TRUE in case of success, else FALSE. + */ + private function abort_queue_entries($ids) + { + if(!count($ids)){ + return; + } + print_red(_("Not implemented.")); + return(TRUE); + } + + /*! \brief Pauses the specified queue entry from execution. * @return Boolean TRUE in case of success, else FALSE. */ -- 2.30.2