Code

Updated gotomasses
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 25 Mar 2008 14:23:15 +0000 (14:23 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 25 Mar 2008 14:23:15 +0000 (14:23 +0000)
-Allow update job remove

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9976 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/addons/goto/class_gotomasses.inc

index bedeaced1a9a8675ae2547a281511b298c8d6fa6..286692c3223386b93a15616501ff79badef67e19 100644 (file)
@@ -199,7 +199,8 @@ class gotomasses extends plugin
           foreach($ret as $task){
 
             /* Only remove WAITING or ERROR entries */
-            if(in_array($task['STATUS'],array("waiting","error"))){
+            if(in_array($task['STATUS'],array("waiting","error")) || 
+               ($task['STATUS'] == "processing" && !preg_match("/install/",$task['HEADERTAG'])) ){
               $this->ids_to_remove[] = $task['ID'];
               if(isset($this->events['QUEUED'][$task['HEADERTAG']])){
                 $evt_name = $this->events['QUEUED'][$task['HEADERTAG']];
@@ -375,7 +376,7 @@ class gotomasses extends plugin
 
       /* If PROCESSING add abort action
        */  
-      if(in_array($task['STATUS'],array("processing")) && preg_match("/*install*/",$task['HEADERTAG'])){
+      if(in_array($task['STATUS'],array("processing")) && preg_match("/install/",$task['HEADERTAG'])){
         $prio_actions.= "<input class='center' type='image' src='images/small_error.png' 
           title='"._("Abort execution")."' name='abort_process_".$key."'>";
       }
@@ -400,6 +401,10 @@ class gotomasses extends plugin
         $action.= "<input type='image' src='images/edittrash.png' name='remove_task_".$key."' 
           class='center' alt='"._("Remove")."'>";
       }
+      if(in_array($task['STATUS'],array("processing")) && !preg_match("/install/",$task['HEADERTAG'])){
+        $action.= "<input type='image' src='images/edittrash.png' name='remove_task_".$key."' 
+          class='center' alt='"._("Remove")."'>";
+      }
 
       $color = "";
       $display = $task['MACADDRESS'];