From: hickert Date: Thu, 8 Jun 2006 05:37:18 +0000 (+0000) Subject: Updated NTP && FOnserver X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=92d02bb2df76670fef46d2fd04cdc289b7c2b279;p=gosa.git Updated NTP && FOnserver git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3700 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_goFonServer.inc b/plugins/admin/systems/class_goFonServer.inc index cdb123bde..3094cc3a5 100644 --- a/plugins/admin/systems/class_goFonServer.inc +++ b/plugins/admin/systems/class_goFonServer.inc @@ -117,10 +117,14 @@ class goFonServer extends plugin{ function check() { $message = plugin::check(); - foreach (array("goFonAdmin", "goFonAreaCode", "goFonCountryCode") as $attr){ - if ($this->$attr == "" || preg_match("/ /", $this->$attr)){ - $message[]= sprintf(_("The attribute '%s' is empty or contains invalid characters."), $attr); - } + if (empty($this->goFonAdmin)){ + $message[]= sprintf(_("The attribute DB user is empty or contains invalid characters."), $attr); + } + if (empty($this->goFonAreaCode)){ + $message[]= sprintf(_("The attribute local dial prefix is empty or contains invalid characters."), $attr); + } + if (empty($this->goFonCountryCode)){ + $message[]= sprintf(_("The attribute country dial prefix is empty or contains invalid characters."), $attr); } return($message); } diff --git a/plugins/admin/systems/class_goNtpServer.inc b/plugins/admin/systems/class_goNtpServer.inc index fa6e11c07..b7577f202 100644 --- a/plugins/admin/systems/class_goNtpServer.inc +++ b/plugins/admin/systems/class_goNtpServer.inc @@ -48,7 +48,7 @@ class goNtpServer extends plugin{ } /* Deleting an Entry, is a bit more complicated than adding one*/ - if(isset($_POST['DelNTPEnt'])) { + if((isset($_POST['DelNTPEnt'])) && (isset($_POST['goTimeSource']))) { foreach ($_POST['goTimeSource'] as $entry){ if (isset($this->goTimeSource[$entry])){ unset($this->goTimeSource[$entry]); diff --git a/plugins/admin/systems/goFonServer.tpl b/plugins/admin/systems/goFonServer.tpl index f303abb8a..b6bc344bd 100644 --- a/plugins/admin/systems/goFonServer.tpl +++ b/plugins/admin/systems/goFonServer.tpl @@ -1,7 +1,7 @@

{t}VoIP database information{/t}

- + @@ -9,11 +9,11 @@ - + - +
{t}Asterisk DB user{/t}{t}Asterisk DB user{/t}{$must}
{t}Country dial prefix{/t}{t}Country dial prefix{/t}{$must}
{t}Local dial prefix{/t}{t}Local dial prefix{/t}{$must}