summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 18c039e)
raw | patch | inline | side by side (parent: 18c039e)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 20 Jun 2006 03:38:45 +0000 (03:38 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 20 Jun 2006 03:38:45 +0000 (03:38 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3820 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 eef36caed4528f719258b23e6bfac1391eb2a3d2..73aa90a76092045ec169da9df85ab24119083c86 100644 (file)
if((preg_match("/".$attr."/",$name))&&($only_once)){
if(chkacl($this->acl,$attr)!=""){
$only_once = false;
- #FIXME Please choose a better error msg, if release is released
- print_red(sprintf(_("Please check your 'gosa.conf' the given '%s' can't be executed."),$attr));
+ print_red(sprintf(_("You do not have permission to execute the command '%s' on the mailqueue."),$attr));
}else{
$only_once = false;
$act = preg_replace("/_.*$/i","",$attr);
$only_once = false;
if(chkacl($this->acl,$opt)!=""){
- print_red(sprintf(_("Please check your 'gosa.conf' the given '%s' can't be executed."),$opt));
+ print_red(sprintf(_("You do not have permission to execute the command '%s' on the mailqueue."),$opt));
}else{
/* Create cmd */
$r_cmd = preg_replace("/%action/" , $opt ,$this->mailQueueScript);
$q_cmd = preg_replace("/%server/" ,$this->Server,$q_cmd);
$q_cmd = preg_replace("/%id/" ,"all" ,$q_cmd);
- /* Only display this if the query cmd is executeable */
- if($str = @$this->pass_cmd ($q_cmd)){
- /* Parse returned data */
- $mailQueueParser = new parseMailQueue($str,$this->Server);
+ if(chkacl($this->acl,"query")!=""){
+ print_red(sprintf(_("You do not have permission to execute the command '%s' on the mailqueue."),"query"));
+ $mailQueueParser = new parseMailQueue("",$this->Server);
}else{
- /* On error/ no return value / false return value */
- print_red(sprintf(_("Please check your 'gosa.conf' the given '%s' can't be executed."),$q_cmd));
- $error = true;
- }
+ /* Only display this if the query cmd is executeable */
+ if($str = @$this->pass_cmd ($q_cmd)){
+ /* Parse returned data */
+ $mailQueueParser = new parseMailQueue($str,$this->Server);
+ }else{
+ /* On error/ no return value / false return value */
+ print_red(sprintf(_("Please check your 'gosa.conf' the given '%s' can't be executed."),$q_cmd));
+ $error = true;
+ }
+ }
}else{
$mailQueueParser = NULL;
foreach($this->getServer() as $ServerID=>$ServerName){
-
+
/* Don't query the server named all :) */
if($ServerID == "all") continue;
$q_cmd = preg_replace("/%server/" ,$ServerName ,$q_cmd);
$q_cmd = preg_replace("/%id/" ,"ALL" ,$q_cmd);
- /* Shell exec this cmd */
- if($str = @$this->pass_cmd ($q_cmd)){
-
- /* If there is no parser available, create one */
- if($mailQueueParser == NULL){
- $mailQueueParser = new parseMailQueue($str,$ServerID);
+ if(chkacl($this->acl,"query")!=""){
+ print_red(sprintf(_("You do not have permission to execute the command '%s' on the mailqueue."),"query"));
+ $mailQueueParser = new parseMailQueue("",$this->Server);
+ }else{
+
+ /* Shell exec this cmd */
+ if($str = @$this->pass_cmd ($q_cmd)){
+
+ /* If there is no parser available, create one */
+ if($mailQueueParser == NULL){
+ $mailQueueParser = new parseMailQueue($str,$ServerID);
+ }else{
+ $mailQueueParser->parseAdditionalQueue($str,$ServerID);
+ }
+ /* On error/ no return value / false return value */
}else{
- $mailQueueParser->parseAdditionalQueue($str,$ServerID);
+ print_red(sprintf(_("Please check your 'gosa.conf' the given '%s' can't be executed."),$q_cmd));
+ $error = true;
}
- /* On error/ no return value / false return value */
- }else{
- print_red(sprintf(_("Please check your 'gosa.conf' the given '%s' can't be executed."),$q_cmd));
- $error = true;
}
}
-
}
/* Check for existing servers