From: hickert Date: Fri, 14 Mar 2008 08:34:05 +0000 (+0000) Subject: msgPool X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d20c0d5f4c0846623eac76a72e4c5bc5e27fb2a3;p=gosa.git msgPool git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9797 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/heimdal/admin/systems/services/kerberos/class_goKrbServer.inc b/gosa-plugins/heimdal/admin/systems/services/kerberos/class_goKrbServer.inc index 3eef127f4..41cfb780f 100644 --- a/gosa-plugins/heimdal/admin/systems/services/kerberos/class_goKrbServer.inc +++ b/gosa-plugins/heimdal/admin/systems/services/kerberos/class_goKrbServer.inc @@ -64,13 +64,13 @@ class goKrbServer extends goService{ $message = plugin::check(); /* goKrbPassword is a must field, if goKrbServer is used as objectClass */ if (empty($this->goKrbPassword)){ - $message[]= sprintf(_("The specified kerberos password is empty."), $attr); + $message[]= msgPool::required(_("Password")); } if (empty($this->goKrbAdmin)){ - $message[]= sprintf(_("The specified kerberos admin is empty."), $attr); + $message[]= msgPool::required(_("Admin")); } if (empty($this->goKrbRealm)){ - $message[]= sprintf(_("The specified kerberos realm is empty."), $attr); + $message[]= msgPool::required(_("Realm")); } return($message); diff --git a/gosa-plugins/heimdal/admin/systems/services/kerberos/class_password-methods-heimdal.inc b/gosa-plugins/heimdal/admin/systems/services/kerberos/class_password-methods-heimdal.inc index bcc87fe19..61b062618 100644 --- a/gosa-plugins/heimdal/admin/systems/services/kerberos/class_password-methods-heimdal.inc +++ b/gosa-plugins/heimdal/admin/systems/services/kerberos/class_password-methods-heimdal.inc @@ -108,13 +108,13 @@ class passwordMethodheimdal extends passwordMethod if(isset($config->current['HEIMDAL_KEYGEN'])){ $cmd = $config->current['HEIMDAL_KEYGEN']; if(!check_command($cmd)){ - new msg_dialog(_("Heimdal"),sprintf(_("The configured HEIMDAL_KEYGEN '%s' is not a valid command."),$cmd),WARNING_DIALOG); + new msg_dialog(_("Heimdal"), msgPool::cmdinvalid("HEIMDAL_KEYGEN",$cmd,_("Heimdal")),WARNING_DIALOG); } } if(isset($this->config->data['MAIN']['HEIMDAL_KEYGEN'])){ $cmd = $this->config->data['MAIN']['HEIMDAL_KEYGEN']; if(!check_command($cmd)){ - new msg_dialog(_("Heimdal"),sprintf(_("The configured HEIMDAL_KEYGEN '%s' is not a valid command."),$cmd),WARNING_DIALOG); + new msg_dialog(_("Heimdal"), msgPool::cmdinvalid("HEIMDAL_KEYGEN",$cmd,_("Heimdal")),WARNING_DIALOG); } } if(isset($config->data['SERVERS']['KERBEROS']['REALM']) && check_command($cmd)){ @@ -164,13 +164,13 @@ class passwordMethodheimdal extends passwordMethod if(isset($config->current['HEIMDAL_KEYGEN'])){ $cmd = $config->current['HEIMDAL_KEYGEN']; if(!check_command($cmd)){ - new msg_dialog(_("Heimdal"),sprintf(_("The configured HEIMDAL_KEYGEN '%s' is not a valid command."),$cmd),WARNING_DIALOG); + new msg_dialog(_("Heimdal"), msgPool::cmdinvalid("HEIMDAL_KEYGEN",$cmd,_("Heimdal")),WARNING_DIALOG); } } if(isset($this->config->data['MAIN']['HEIMDAL_KEYGEN'])){ $cmd = $this->config->data['MAIN']['HEIMDAL_KEYGEN']; if(!check_command($cmd)){ - new msg_dialog(_("Heimdal"),sprintf(_("The configured HEIMDAL_KEYGEN '%s' is not a valid command."),$cmd),WARNING_DIALOG); + new msg_dialog(_("Heimdal"), msgPool::cmdinvalid("HEIMDAL_KEYGEN",$cmd,_("Heimdal")),WARNING_DIALOG); } } if ($cmd != ""){ @@ -182,7 +182,7 @@ class passwordMethodheimdal extends passwordMethod $cmd = $cmd." '".$this->generate_hash($password)."' '".$password."'" ; exec($cmd,$out,$res); if($res != 0){ - new msg_dialog(_("Heimdal"),sprintf(_("The configured HEIMDAL_KEYGEN '%s' wasn't successfully executed. Command does not return 0."),$cmdd),WARNING_DIALOG); + new msg_dialog(_("Heimdal"), msgPool::cmdexecfailed("HEIMDAL_KEYGEN",$cmd,_("Heimdal")),WARNING_DIALOG); } } } @@ -325,19 +325,19 @@ class passwordMethodheimdal extends passwordMethod { $message = array(); if(!is_numeric($this->krb5MaxLife) && !empty($this->krb5MaxLife)){ - $message[] = sprintf(_("Please specify a numeric value for %s."),_("Max life")); + $message[] = msgPool::invalid(_("Max life"),$this->krb5MaxLife,"/[0-9]/"); } if(!is_numeric($this->krb5MaxRenew) && !empty($this->krb5MaxRenew)){ - $message[] = sprintf(_("Please specify a numeric value for %s."),_("Max renew")); + $message[] = msgPool::invalid(_("Max renew"),$this->krb5MaxRenew,"/[0-9]/"); } if(!$this->krb5ValidStart_clear && !$this->chk_times($this->krb5ValidStart)){ - $message[] = sprintf(_("Please specify a numeric value for %s."),_("Valid start")); + $message[] = msgPool::invalid(_("Valid start"),$this->krb5ValidStart,"/[0-9]/"); } if(!$this->krb5ValidEnd_clear && !$this->chk_times($this->krb5ValidEnd)){ - $message[] = sprintf(_("Please specify a numeric value for %s."),_("Valid end")); + $message[] = msgPool::invalid(_("Valid end"),$this->krb5ValidEnd,"/[0-9]/"); } if(!$this->krb5PasswordEnd_clear && !$this->chk_times($this->krb5PasswordEnd)){ - $message[] = sprintf(_("Please specify a numeric value for %s."),_("Valid password")); + $message[] = msgPool::invalid(_("Valid password"),$this->krb5PasswordEnd,"/[0-9]/"); } return($message); }