From 63ae5bb2f098718d141c48bea7cc0fd7a357e65b Mon Sep 17 00:00:00 2001 From: cajus Date: Wed, 16 Jan 2008 13:14:19 +0000 Subject: [PATCH] Replaced print_red for addons git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8386 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../addons/addressbook/class_addressbook.inc | 6 ++-- .../addons/gotomasses/class_gotomasses.inc | 10 +++---- .../addons/gotomasses/class_target_list.inc | 4 +-- .../addons/ldapmanager/class_csvimport.inc | 19 ++++++------ .../addons/ldapmanager/class_export.inc | 4 +-- .../addons/ldapmanager/class_exportxls.inc | 5 ++-- .../addons/ldapmanager/class_import.inc | 30 ++++++++++++------- .../addons/logview/class_gosa_logview.inc | 12 ++++---- .../plugins/addons/logview/class_logview.inc | 16 +++++----- .../addons/mailqueue/class_mailqueue.inc | 21 +++++++------ 10 files changed, 67 insertions(+), 60 deletions(-) diff --git a/gosa-core/plugins/addons/addressbook/class_addressbook.inc b/gosa-core/plugins/addons/addressbook/class_addressbook.inc index b1821bcd0..eddfcdf2c 100644 --- a/gosa-core/plugins/addons/addressbook/class_addressbook.inc +++ b/gosa-core/plugins/addons/addressbook/class_addressbook.inc @@ -175,7 +175,7 @@ class addressbook extends plugin return($smarty->fetch(get_template_path('dial.tpl', TRUE))); return; } else { - print_red (_("You have no personal phone number set. Please change that in order to perform direct dials.")); + msg_dialog::display(_("Error"), _("You need to set your personal phone number in order to perform direct dials."), ERROR_DIALOG); } } @@ -209,7 +209,7 @@ class addressbook extends plugin /* Normally this shouldn't be reached, send some extra logs to notify the administrator */ - print_red (_("You are not allowed to delete this entry!")); + msg_dialog::display(_("Permission error"), _("You have no permission to delete this entry!"), ERROR_DIALOG); new log("remove","addressbook/".get_class($this),$this->dn,array(),"Warning: '".$this->ui->uid."' tried to trick address book deletion."); } @@ -317,7 +317,7 @@ class addressbook extends plugin /* Obviously the user isn't allowed to delete. Show message and clean session. */ - print_red (_("You are not allowed to delete this entry!")); + msg_dialog::display(_("Permission error"), _("You have no permission to delete this entry!"), ERROR_DIALOG); } } session::set('show_info',"ADD"); diff --git a/gosa-core/plugins/addons/gotomasses/class_gotomasses.inc b/gosa-core/plugins/addons/gotomasses/class_gotomasses.inc index d34a73641..b40fdc1b8 100644 --- a/gosa-core/plugins/addons/gotomasses/class_gotomasses.inc +++ b/gosa-core/plugins/addons/gotomasses/class_gotomasses.inc @@ -99,7 +99,7 @@ class gotomasses extends plugin default : trigger_error("Undefined priority setting used."); } if($this->o_queue->is_error()){ - print_red($this->o_queue->get_error()); + msg_dialog::display(_("Error"), $this->o_queue->get_error(), ERROR_DIALOG); } } @@ -111,7 +111,7 @@ class gotomasses extends plugin if($s_action == "remove_multiple" || $s_action == "remove"){ if(!$this->acl_is_removeable()){ - print_red(_("You are not allowed to remove a task.")); + msg_dialog::display(_("Permission error"), _("You have no permission to delete this entry!"), ERROR_DIALOG); }else{ if($s_action == "remove"){ @@ -185,7 +185,7 @@ class gotomasses extends plugin $msgs = $this->dialog->check(); if(count($msgs)){ foreach($msgs as $msg){ - print_red($msg); + msg_dialog::display(_("Error"), $msg, ERROR_DIALOG); } }else{ @@ -200,7 +200,7 @@ class gotomasses extends plugin $tmp2[] = $tmp; } if(!$this->o_queue->add_multiple($tmp2)){ - print_red($this->o_queue->get_error()); + msg_dialog::display(_("Error"), $this->o_queue->get_error(), ERROR_DIALOG); } } if(!isset($_POST['apply_goto_task'])){ @@ -234,7 +234,7 @@ class gotomasses extends plugin function get_queue_entries() { if(!$this->o_queue->load()){ - print_red(sprintf(_("An error occurred while requesting queue entries. Error was '%s'."),$this->o_queue->get_error())); + msg_dialog::display(_("Error"), sprintf(_("Cannot load queue entries: %s"), "

".$this->o_queue->get_error()), ERROR_DIALOG); return(array()); } $tasks = array(); diff --git a/gosa-core/plugins/addons/gotomasses/class_target_list.inc b/gosa-core/plugins/addons/gotomasses/class_target_list.inc index 15d3fb1ae..2cf1a24e1 100644 --- a/gosa-core/plugins/addons/gotomasses/class_target_list.inc +++ b/gosa-core/plugins/addons/gotomasses/class_target_list.inc @@ -226,11 +226,11 @@ class target_list extends MultiSelectWindow if($this->IPMatch){ if(!tests::is_ip($IP_start)){ - print_red(_("Please specify a valid IP range.")); + msg_dialog::display(_("Error"), _("IP range is invalid!"), ERROR_DIALOG); return; } if(!tests::is_ip($IP_end)){ - print_red(_("Please specify a valid IP range.")); + msg_dialog::display(_("Error"), _("IP range is invalid!"), ERROR_DIALOG); return; } } diff --git a/gosa-core/plugins/addons/ldapmanager/class_csvimport.inc b/gosa-core/plugins/addons/ldapmanager/class_csvimport.inc index 66131ca21..bd84fa82e 100644 --- a/gosa-core/plugins/addons/ldapmanager/class_csvimport.inc +++ b/gosa-core/plugins/addons/ldapmanager/class_csvimport.inc @@ -102,7 +102,7 @@ class csvimport extends plugin $acl = $this->ui->get_permissions($this->config->current['BASE'],"all/all"); if(!preg_match("/w/",$acl)){ if(isset($_POST['userfile']) || isset($_POST['sorted']) || isset($_POST['fileup'])){ - print_red(_("You've no permission to do CSV imports.")); + msg_dialog::display(_("Permission error"), _("You've no permission to import CSV files."), ERROR_DIALOG); } return ($smarty->fetch (get_template_path('contentcsv.tpl', TRUE))); } @@ -162,8 +162,7 @@ class csvimport extends plugin (!isset($dat['sn']))||(!isset($dat['givenName']))||(!isset($dat['uid']))){ /* Output Error */ - - print_red (_("Need 'sn','givenName' and 'uid' to create user.")); + msg_dialog::display(_("Error"), _("Need at least 'sn', 'givenName' and 'uid' to create users."), ERROR_DIALOG); } else { /* Register usertab to trigger edit dialog */ @@ -283,7 +282,7 @@ class csvimport extends plugin /* Error? */ if ($failing){ - print_red(sprintf(_("An Error Occured while inserting entry %s - process aborted"), $failing)); + msg_dialog::display(_("Error"), sprintf(_("Cannot insert entry '%s'!"), $failing), ERROR_DIALOG); } $smarty->assign("error",$failing); @@ -321,7 +320,7 @@ class csvimport extends plugin $smarty->assign("tpl",$arrtemplates[$tplid]); - print_red (_("Nothing to import!")); + msg_dialog::display(_("Information"), _("Nothing to import!"), INFO_DIALOG); } /* If theres a File uploaded */ @@ -333,23 +332,23 @@ class csvimport extends plugin if((!isset($_FILES['userfile']['name']))||(!isset($_POST['fileup']))) { - print_red(_("There is no file uploaded.")); + msg_dialog::display(_("Error"), sprintf(_("Cannot read uploaded file: %s"), _("file not found")), ERROR_DIALOG); $smarty->assign("LDIFError",TRUE); } elseif(!$_FILES['userfile']['size'] > 0 ) { - print_red(_("The specified file is empty.")); + msg_dialog::display(_("Error"), sprintf(_("Cannot read uploaded file: %s"), _("file is empty")), ERROR_DIALOG); $smarty->assign("LDIFError",TRUE); } /* Is there a tmp file, which we can use ? */ elseif(!file_exists($_FILES['userfile']['tmp_name'])) { - print_red(_("There is no file uploaded.")); + msg_dialog::display(_("Error"), sprintf(_("Cannot read uploaded file: %s"), _("file not found")), ERROR_DIALOG); $smarty->assign("LDIFError",TRUE); } elseif(!$handle = @fopen($_FILES['userfile']['tmp_name'],"r")) { - print_red(_("There is no file uploaded.")); + msg_dialog::display(_("Error"), sprintf(_("Cannot read uploaded file: %s"), _("file not readable")), ERROR_DIALOG); $smarty->assign("LDIFError",TRUE); } else @@ -492,7 +491,7 @@ class csvimport extends plugin $smarty->assign("tpl",$this->csvinfo['attr'][$_POST['template']]); $smarty->assign("LDIFError",TRUE); $smarty->assign("fileup",FALSE); - print_red(_("The selected file does not contain any CSV Data...")); + msg_dialog::display(_("Error"), _("Cannot find CSV data in the selected file!"), ERROR_DIALOG); } } } diff --git a/gosa-core/plugins/addons/ldapmanager/class_export.inc b/gosa-core/plugins/addons/ldapmanager/class_export.inc index aa988a312..41ae7212c 100644 --- a/gosa-core/plugins/addons/ldapmanager/class_export.inc +++ b/gosa-core/plugins/addons/ldapmanager/class_export.inc @@ -81,7 +81,7 @@ class ldifexport extends plugin { if(!($ldap->dn_exists($dn) && $dn != "")){ $smarty->assign("LDIFError",TRUE); - print_red (_("Error while exporting the requested entries!")); + msg_dialog::display(_("Error"), _("Cannot export selected entries!"), ERROR_DIALOG); } } @@ -93,7 +93,7 @@ class ldifexport extends plugin if((!preg_match("/r/",$acls)) && (isset($dn))){ /* Show error msg */ - print_red(sprintf(_("You are not allowed to export the given ldap entry (%s)"),@LDAP::fix($dn))); + msg_dialog::display(_("Permission error"), sprintf(_("You have no permission to export '%s'!"),@LDAP::fix($dn)), ERROR_DIALOG); /* Show main page */ $smarty->assign("LDIFError",TRUE); diff --git a/gosa-core/plugins/addons/ldapmanager/class_exportxls.inc b/gosa-core/plugins/addons/ldapmanager/class_exportxls.inc index 90bab709a..c9917dd8c 100644 --- a/gosa-core/plugins/addons/ldapmanager/class_exportxls.inc +++ b/gosa-core/plugins/addons/ldapmanager/class_exportxls.inc @@ -1,6 +1,5 @@ dn_exists($dn) && $dn != "")){ $smarty->assign("LDIFError",TRUE); - print_red (_("Error while exporting the requested entries!")); + msg_dialog::display(_("Error"), _("Cannot export selected entries!"), ERROR_DIALOG); } } @@ -109,7 +108,7 @@ class xlsexport extends plugin if(!preg_match("/r/",$acls) && (isset($_POST['sfrmgetsingle']) || isset($_POST['sfrmgetfull']) || isset($_POST['sfrmgetivbb']))){ /* Show error msg */ - print_red(sprintf(_("You are not allowed to export the given ldap entry (%s)"),@LDAP::fix($dn))); + msg_dialog::display(_("Error"), sprintf(_("You have no permission to export '%s'!"),@LDAP::fix($dn)), ERROR_DIALOG); /* Show main page */ $smarty->assign("LDIFError",TRUE); diff --git a/gosa-core/plugins/addons/ldapmanager/class_import.inc b/gosa-core/plugins/addons/ldapmanager/class_import.inc index 71edbb2a2..ac2a81085 100644 --- a/gosa-core/plugins/addons/ldapmanager/class_import.inc +++ b/gosa-core/plugins/addons/ldapmanager/class_import.inc @@ -49,7 +49,7 @@ class ldifimport extends plugin /* Check acls */ if(!preg_match("/w/",$acl)){ - print_red(_("You need full access to all objects, to execute the import command.")); + msg_dialog::display(_("Permission error"), _("You need full write access to the LDAP tree to import data!"), ERROR_DIALOG); }else{ $smarty->assign("type","importfile"); @@ -58,14 +58,14 @@ class ldifimport extends plugin // Check if there is a file submitted if(!$_FILES['userfile']['size'] > 0 ) { - print_red(_("The specified file is empty.")); + msg_dialog::display(_("Error"), sprintf(_("Cannot read uploaded file: %s"), _("file is empty")), ERROR_DIALOG); $smarty->assign("LDIFError",TRUE); } // Is there a tmp file, which we can use ? elseif(!file_exists($_FILES['userfile']['tmp_name'])) { - print_red(_("There is no file uploaded.")); + msg_dialog::display(_("Error"), sprintf(_("Cannot read uploaded file: %s"), _("file not found")), ERROR_DIALOG); $smarty->assign("LDIFError",TRUE); } @@ -73,7 +73,7 @@ class ldifimport extends plugin // Can we open the tmp file, for reading elseif(!$handle = @fopen($_FILES['userfile']['tmp_name'],"r")) { - print_red(_("There is no file uploaded.")); + msg_dialog::display(_("Error"), sprintf(_("Cannot read uploaded file: %s"), _("file not readable")), ERROR_DIALOG); $smarty->assign("LDIFError",TRUE); } else @@ -95,18 +95,28 @@ class ldifimport extends plugin $ErrorStr=""; $check = $ldap->import_complete_ldif($str,$ErrorStr,$overwrite,$cleanup); - if($check == INSERT_OK ) + if($check == INSERT_OK ){ $smarty->assign("LDIFError",FALSE); - else + } else { $smarty->assign("LDIFError",TRUE); + } switch($check) { - case INSERT_OK : break; - case ALREADY_EXISTING_ENTRY : print_red($ErrorStr); break; - case UNKNOWN_TOKEN_IN_LDIF_FILE : print_red($ErrorStr);break; + case INSERT_OK: + break; - default : print_red(_("Unknown Error"));break; + case ALREADY_EXISTING_ENTRY: + msg_dialog::display(_("LDAP error"), $ErrorStr, ERROR_DIALOG); + break; + + case UNKNOWN_TOKEN_IN_LDIF_FILE: + msg_dialog::display(_("LDAP error"), $ErrorStr, ERROR_DIALOG); + break; + + default: + msg_dialog::display(_("Internal error"), sprintf(_("Undefined flag '%s'!"), $check), ERROR_DIALOG); + break; } } } diff --git a/gosa-core/plugins/addons/logview/class_gosa_logview.inc b/gosa-core/plugins/addons/logview/class_gosa_logview.inc index 5d8c62277..9079abe39 100644 --- a/gosa-core/plugins/addons/logview/class_gosa_logview.inc +++ b/gosa-core/plugins/addons/logview/class_gosa_logview.inc @@ -113,12 +113,12 @@ class gosa_logview extends plugin * and mysql extension ****/ if (!isset($this->config->data['SERVERS']['LOGGING']) || !count($this->config->data['SERVERS']['LOGGING'])){ - print_red (_("No GOsa LOG servers defined!")); + msg_dialog::display(_("Warning"), sprintf(_("No %s servers defined!"), "GOsa log"), WARNING_DIALOG); return ($smarty->fetch (get_template_path('gosa_log_contents.tpl', TRUE))); } if(!is_callable("mysql_connect")){ - print_red(_("There is no mysql extension available, please check your php setup.")); + msg_dialog::display(_("Configuration error"), sprintf(_("Missing %s PHP extension!"), "mysql"), WARNING_DIALOG); return ($smarty->fetch (get_template_path('gosa_log_contents.tpl', TRUE))); } @@ -143,14 +143,14 @@ class gosa_logview extends plugin $cfg = $list_of_servers[$this->server]; $link = @mysql_pconnect($this->server, $cfg['USER'], $cfg['PWD']); if ($link === FALSE){ - print_red(_("Can't connect to log database, no logs can be shown!")); + msg_dialog::display(_("Error"), sprintf(_("Cannot connect to %s database!"), "GOsa LOG"), ERROR_DIALOG); new log("debug","logview","",array(),@mysql_error()); return ($smarty->fetch (get_template_path('gosa_log_contents.tpl', TRUE))); } /* check of log database is available */ if (! @mysql_select_db($cfg['DB'])){ - print_red(_("Can't select log database for log generation!")); + msg_dialog::display(_("Error"), sprintf(_("Cannot select %s database!"), "GOsa LOG"), ERROR_DIALOG); new log("debug","logview","",array(),@mysql_error()); return ($smarty->fetch (get_template_path('gosa_log_contents.tpl', TRUE))); } @@ -199,12 +199,12 @@ class gosa_logview extends plugin /* Test connection object && create up query string */ if ($link === FALSE){ - print_red(_("Can't connect to log database, no logs can be shown!")); + msg_dialog::display(_("Error"), sprintf(_("Cannot connect to %s database!"), "GOsa LOG"), ERROR_DIALOG); new log("debug","logview","",array(),@mysql_error()); } else { if (! @mysql_select_db($cfg['DB'])){ - print_red(_("Can't select log database for log generation!")); + msg_dialog::display(_("Error"), sprintf(_("Cannot select %s database!"), "GOsa LOG"), ERROR_DIALOG); new log("debug","logview","",array(),@mysql_error()); } else { diff --git a/gosa-core/plugins/addons/logview/class_logview.inc b/gosa-core/plugins/addons/logview/class_logview.inc index df0f667be..3349a69fa 100644 --- a/gosa-core/plugins/addons/logview/class_logview.inc +++ b/gosa-core/plugins/addons/logview/class_logview.inc @@ -75,11 +75,11 @@ class logview extends plugin /* Test connection to log database */ if (!isset($this->config->data['SERVERS']['LOG'])){ - print_red (_("No LOG servers defined!")); + msg_dialog::display(_("Warning"), sprintf(_("No %s servers defined!"), "syslog"), WARNING_DIALOG); return ($smarty->fetch (get_template_path('contents.tpl', TRUE))); }elseif(!is_callable("mysql_connect")){ - print_red(_("There is no mysql extension available, please check your php setup.")); + msg_dialog::display(_("Configuration error"), sprintf(_("Missing %s PHP extension!"), "mysql"), WARNING_DIALOG); return ($smarty->fetch (get_template_path('contents.tpl', TRUE))); }else{ @@ -90,14 +90,14 @@ class logview extends plugin /* Open link to database and check if it is valid */ $link = @mysql_pconnect($cfg['SERVER'], $cfg['LOGIN'], $cfg['PASSWORD']); if ($link === FALSE){ - print_red(_("Can't connect to log database, no logs can be shown!")); + msg_dialog::display(_("Error"), sprintf(_("Cannot connect to %s database!"), "syslog"), ERROR_DIALOG); new log("debug","logview","",array(),@mysql_error()); return ($smarty->fetch (get_template_path('contents.tpl', TRUE))); } /* check of log database is available */ if (! @mysql_select_db("gomon")){ - print_red(_("Can't select log database for log generation!")); + msg_dialog::display(_("Error"), sprintf(_("Cannot select %s database!"), "syslog"), ERROR_DIALOG); new log("debug","logview","",array(),@mysql_error()); return ($smarty->fetch (get_template_path('contents.tpl', TRUE))); } @@ -110,7 +110,7 @@ class logview extends plugin @DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__, $query, "Database query"); $result = @mysql_query($query); if ($result === false){ - print_red(_("Query for log database failed!. Requesting host names failed.")); + msg_dialog::display(_("Error"), _("Cannot obtain host list from syslog database!"), ERROR_DIALOG); new log("debug","logview","",array(),@mysql_error()); return ($smarty->fetch (get_template_path('contents.tpl', TRUE))); } @@ -133,7 +133,7 @@ class logview extends plugin $result = @mysql_query($query); if ($result === false){ new log("debug","logview","",array(),@mysql_error()); - print_red(_("Query for log database failed!")); + msg_dialog::display(_("Error"), _("Database query failed!"), ERROR_DIALOG); return ($smarty->fetch (get_template_path('contents.tpl', TRUE))); } @@ -190,11 +190,11 @@ class logview extends plugin /* Test connection object && create up query string */ if ($link === FALSE){ - print_red(_("Can't connect to log database, no logs can be shown!")); + msg_dialog::display(_("Error"), sprintf(_("Cannot connect to %s database!"), "syslog"), ERROR_DIALOG); new log("debug","logview","",array(),@mysql_error()); } else { if (! @mysql_select_db("gomon")){ - print_red(_("Can't select log database for log generation!")); + msg_dialog::display(_("Error"), sprintf(_("Cannot select %s database!"), "syslog"), ERROR_DIALOG); new log("debug","logview","",array(),@mysql_error()); } else { diff --git a/gosa-core/plugins/addons/mailqueue/class_mailqueue.inc b/gosa-core/plugins/addons/mailqueue/class_mailqueue.inc index 6b1e6e46e..fd890dfa4 100644 --- a/gosa-core/plugins/addons/mailqueue/class_mailqueue.inc +++ b/gosa-core/plugins/addons/mailqueue/class_mailqueue.inc @@ -38,7 +38,6 @@ class mailqueue extends plugin function pass_cmd($str) { -// print_red($str); return(shell_exec($str)); } @@ -62,7 +61,7 @@ class mailqueue extends plugin $error =false; if(empty($this->mailQueueScript)){ - print_red(_("Please check your 'gosa.conf', there is no 'MAILQUEUESCRIPTPATH' specified.")); + msg_dialog::display(_("Configuration error"), sprintf(_("Missing '%s' directive in configuration!"), "mailqueuescriptpath"), ERROR_DIALOG); $error = true; }else{ @@ -89,7 +88,7 @@ class mailqueue extends plugin if((preg_match("/".$attr."/",$name))&&($only_once)){ if(!$this->acl_is_readable($attr)){ $only_once = false; - print_red(sprintf(_("You do not have permission to execute the command '%s' on the mailqueue."),$attr)); + msg_dialog::display(_("Permission error"), sprintf(_("You have no permission to submit a '%s' command!"), $attr), ERROR_DIALOG); }else{ $only_once = false; $act = preg_replace("/_.*$/i","",$attr); @@ -97,7 +96,7 @@ class mailqueue extends plugin $r_cmd = preg_replace("/%server/" , $se_str ,$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)); + msg_dialog::display(_("Configuration error"), sprintf(_("'%s' defined for the '%s' directive cannot be executed!"), $r_cmd, "mailqueuescriptpath"), ERROR_DIALOG); } } } @@ -116,7 +115,7 @@ class mailqueue extends plugin $only_once = false; if(!$this->acl_is_readable($opt)){ - print_red(sprintf(_("You do not have permission to execute the command '%s' on the mailqueue."),$opt)); + msg_dialog::display(_("Permission error"), sprintf(_("You have no permission to submit a '%s' command!"), $opt), ERROR_DIALOG); }else{ /* Create cmd */ $r_cmd = preg_replace("/%action/" , $opt ,$this->mailQueueScript); @@ -125,7 +124,7 @@ class mailqueue extends plugin /* Execute cmd */ if(!$str = $this->pass_cmd($r_cmd)){ - print_red(sprintf(_("Please check your 'gosa.conf' the given '%s' can't be executed."),$r_cmd)); + msg_dialog::display(_("Configuration error"), sprintf(_("'%s' defined for the '%s' directive cannot be executed!"), $r_cmd, "mailqueuescriptpath"), ERROR_DIALOG); }else{ /* Special handling for option='header' */ @@ -175,7 +174,7 @@ class mailqueue extends plugin $q_cmd = preg_replace("/%id/" ,"all" ,$q_cmd); if(!$this->acl_is_readable("query")){ - print_red(sprintf(_("You do not have permission to execute the command '%s' on the mailqueue."),"query")); + msg_dialog::display(_("Permission error"), sprintf(_("You have no permission to submit a '%s' command!"), "query"), ERROR_DIALOG); $mailQueueParser = new parseMailQueue("",$this->Server); }else{ @@ -185,7 +184,7 @@ class mailqueue extends plugin $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)); + msg_dialog::display(_("Configuration error"), sprintf(_("'%s' defined for the '%s' directive cannot be executed!"), $q_cmd, "mailqueuescriptpath"), ERROR_DIALOG); $error = true; } } @@ -203,7 +202,7 @@ class mailqueue extends plugin if(!$this->acl_is_readable("query")){ - print_red(sprintf(_("You do not have permission to execute the command '%s' on the mailqueue."),"query")); + msg_dialog::display(_("Permission error"), sprintf(_("You have no permission to submit a '%s' command!"), "query"), ERROR_DIALOG); $mailQueueParser = new parseMailQueue("",$this->Server); }else{ @@ -218,7 +217,7 @@ class mailqueue extends plugin } /* 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)); + msg_dialog::display(_("Configuration error"), sprintf(_("'%s' defined for the '%s' directive cannot be executed!"), $q_cmd, "mailqueuescriptpath"), ERROR_DIALOG); $error = true; } } @@ -230,7 +229,7 @@ class mailqueue extends plugin Else display error */ $server = $this->getServer(); if((count($server) == 1 ) && (isset($server['all']))){ - print_red(_("There are no mail server specified.")); + msg_dialog::display(_("Configuration error"), _("No mail servers sepcified!"), ERROR_DIALOG); $error = true; } -- 2.30.2