From: hickert Date: Tue, 9 Jan 2007 04:01:56 +0000 (+0000) Subject: Added some more checks, to prevent saving without valid home server X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9bd405548b4ab3987fcbc3e5a0567be0544fb642;p=gosa.git Added some more checks, to prevent saving without valid home server git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5481 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/gofon/conference/class_phoneConferenceGeneric.inc b/plugins/gofon/conference/class_phoneConferenceGeneric.inc index fe4c11cc8..464b061aa 100644 --- a/plugins/gofon/conference/class_phoneConferenceGeneric.inc +++ b/plugins/gofon/conference/class_phoneConferenceGeneric.inc @@ -78,6 +78,7 @@ class conference extends plugin if(array_key_exists('config',$_SESSION) && array_key_exists('SERVERS',$_SESSION['config']->data) && array_key_exists('FON',$_SESSION['config']->data['SERVERS']) && + count($_SESSION['config']->data['SERVERS']['FON']) && is_callable("mysql_connect") ) { @@ -303,6 +304,12 @@ class conference extends plugin $message[] = $this->is_number_used(); } + /* Check if previously selected server is still available */ + if($this->initially_was_account && !isset($this->goFonHomeServers[$this->goFonHomeServer])){ + $message[]= sprintf(_("The previously selected asterisk home server (%s) is no longer available."),preg_replace("/,/",", ",$this->goFonHomeServer)); + return($message); + } + if((!empty($this->goFonPIN)||($this->goFonConferenceOption_P=="P"))&&($this->goFonConferenceOption_D=="d")){ $message[] =_("You have specified a conference 'without PIN' ... please leave the PIN fields empty."); }