Code

updated del cmd
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 24 Nov 2005 06:10:10 +0000 (06:10 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 24 Nov 2005 06:10:10 +0000 (06:10 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2026 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/addons/mailqueue/class_mailqueue.inc
plugins/addons/mailqueue/contents.tpl

index b995d101a19da81955b22d87d545aeb83546790d..fa8aef008b061452d1349156e649e409799baea7 100644 (file)
@@ -31,6 +31,7 @@ class mailqueue extends plugin
 
   function pass_cmd($str)
   {
+//    print_red($str);
     return(shell_exec($str));
   }
 
@@ -64,15 +65,15 @@ class mailqueue extends plugin
 
       /* Check all post that will effect all entries */
       $only_once = true;
-      foreach(array("unhold_all","hold_all","remove_all","requeue_all") as $attr){
+      foreach(array("unhold_all","hold_all","del_all","requeue_all") as $attr){
         foreach($_POST as $name => $value){
           if((preg_match("/".$attr."/",$name))&&($only_once)){
             $only_once = false;
             $act = preg_replace("/_.*$/i","",$attr);
             $r_cmd = preg_replace("/%action/" , $act           ,$this->mailQueueScript);
             $r_cmd = preg_replace("/%server/" , $se_str         ,$r_cmd);
-            $r_cmd = preg_replace("/%id/"     , "all"           ,$r_cmd);
-            if(!$this->pass_cmd($r_cmd)){
+            $r_cmd = preg_replace("/%id/"     , "ALL"           ,$r_cmd);
+            if($this->pass_cmd($r_cmd)==false){
               print_red(sprintf(_("Please check your 'gosa.conf' the given '%s' can't be executed."),$r_cmd));
             }
           }
index 049a7b9b275d2f3caa4378ca8bb5812fb4cb3ccc..ff855eb70b1fd76c88dec11970f4a8d1a55efe9a 100644 (file)
@@ -27,7 +27,7 @@
        <input name="search" value="{t}Search{/t}" type="submit">
                        </td>
                        <td style="border-left:1px solid #A0A0A0; text-align:right;">&nbsp;
-                               <input name="remove_all"  src="images/edittrash.png"                    value="{t}Remove all messages{/t}"              type="image" 
+                               <input name="del_all"  src="images/edittrash.png"                       value="{t}Remove all messages{/t}"              type="image" 
                                        title="{t}Remove all messages from selected servers queue{/t}">
                                <input name="hold_all"    src="images/mailq_hold.png"                   value="{t}Hold all messages{/t}"                type="image"
                                        title="{t}Hold all messages in selected servers queue{/t}">