From: hickert Date: Wed, 14 Sep 2005 08:35:43 +0000 (+0000) Subject: Added check for existence of goFonServer to Macros X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=167c950535b54103c41bf89af59484bd37d8bb7b;p=gosa.git Added check for existence of goFonServer to Macros git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1356 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/gofon/macro/class_gofonMacro.inc b/plugins/gofon/macro/class_gofonMacro.inc index a44a48995..c4965f1a6 100755 --- a/plugins/gofon/macro/class_gofonMacro.inc +++ b/plugins/gofon/macro/class_gofonMacro.inc @@ -52,6 +52,8 @@ class macro extends plugin { plugin::plugin ($config, $dn); + unset($_SESSION['config']->data['SERVERS']['FON']); + $ldap= $config->get_ldap_link(); $this->dn = $dn; @@ -85,6 +87,10 @@ class macro extends plugin $tmp = array(); $number = 0; + if(!isset($_SESSION['config']->data['SERVERS']['FON'])){ + print_red(_("There is currently no asterisk server defined. Possibly you are missing a server that handles the asterisk management (goFonServer). \n Your Settings can't be saved to asterisk Database. ")); + } + /* Do we represent a valid group? */ if (!$this->is_account && $this->parent == NULL){ $display= "\"\" ". @@ -170,6 +176,10 @@ class macro extends plugin // Generate MySQL Syntax function generate_mysql_entension_entries($save = false,$delete_only=false,$remove_old_macroname=false){ + if(!isset($_SESSION['config']->data['SERVERS']['FON'])){ + return(true); + } + // Get Configuration for Mysql database Server $a_SETUP = $_SESSION['config']->data['SERVERS']['FON'];