summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b1f8f65)
raw | patch | inline | side by side (parent: b1f8f65)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 23 Nov 2005 15:02:01 +0000 (15:02 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 23 Nov 2005 15:02:01 +0000 (15:02 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2023 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/addons/mailqueue/class_mailqueue.inc | patch | blob | history |
diff --git a/plugins/addons/mailqueue/class_mailqueue.inc b/plugins/addons/mailqueue/class_mailqueue.inc
index 989c89253fd357b04dd528cd990b70e964ed9205..14c881d619cb7ff376a494c5ba8af97061cb737c 100644 (file)
$q_cmd = preg_replace("/%action/" ,"query" ,$this->mailQueueScript);
$q_cmd = preg_replace("/%server/" ,$ServerName ,$q_cmd);
- $q_cmd = preg_replace("/%id/" ,"all" ,$q_cmd);
+ $q_cmd = preg_replace("/%id/" ,"ALL" ,$q_cmd);
if($str = @shell_exec ($q_cmd)){
if($mailQueueParser == NULL){
$se_str .= $server." ";
}
- if(isset($_POST['requeue_all'])){
- $r_cmd = preg_replace("/%action/" , "requeue" ,$this->mailQueueScript);
- $r_cmd = preg_replace("/%server/" , $se_str ,$r_cmd);
- $r_cmd = preg_replace("/%id/" , "all" ,$r_cmd);
- if(!shell_exec($r_cmd)){
- print_red(sprintf(_("Please check your 'gosa.conf' the given '%s' can't be executed."),$r_cmd));
- }
- }
- if(isset($_POST['hold_all'])){
- $r_cmd = preg_replace("/%action/" , "hold" ,$this->mailQueueScript);
- $r_cmd = preg_replace("/%server/" , $se_str ,$r_cmd);
- $r_cmd = preg_replace("/%id/" , "all" ,$r_cmd);
- if(!shell_exec($r_cmd)){
- print_red(sprintf(_("Please check your 'gosa.conf' the given '%s' can't be executed."),$r_cmd));
- }
-
- }
- if(isset($_POST['unhold_all'])){
- $r_cmd = preg_replace("/%action/" , "unhold" ,$this->mailQueueScript);
- $r_cmd = preg_replace("/%server/" , $se_str ,$r_cmd);
- $r_cmd = preg_replace("/%id/" , "all" ,$r_cmd);
- if(!shell_exec($r_cmd)){
- print_red(sprintf(_("Please check your 'gosa.conf' the given '%s' can't be executed."),$r_cmd));
- }
- }
- if(isset($_POST['remove_all'])){
- $r_cmd = preg_replace("/%action/" , "remove" ,$this->mailQueueScript);
- $r_cmd = preg_replace("/%server/" , $se_str ,$r_cmd);
- $r_cmd = preg_replace("/%id/" , "all" ,$r_cmd);
- if(!shell_exec($r_cmd)){
- print_red(sprintf(_("Please check your 'gosa.conf' the given '%s' can't be executed."),$r_cmd));
+ foreach (array("requeue", "unhold", "hold", "del") as $type){
+ if(isset($_POST[$type.'_all'])){
+ $r_cmd = preg_replace("/%action/" , "$type" ,$this->mailQueueScript);
+ $r_cmd = preg_replace("/%server/" , $se_str ,$r_cmd);
+ $r_cmd = preg_replace("/%id/" , "ALL" ,$r_cmd);
+ if(!shell_exec($r_cmd)){
+ print_red(sprintf(_("Please check your 'gosa.conf' the given '%s' can't be executed."),$r_cmd));
+ }
}
}