From: hickert Date: Wed, 14 Sep 2005 08:27:47 +0000 (+0000) Subject: Added message if there is no goFonServer defined X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=fd48d0d64a61da856fbe68bae30410243bd4aec3;p=gosa.git Added message if there is no goFonServer defined git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1355 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/gofon/phoneaccount/class_phoneAccount.inc b/plugins/gofon/phoneaccount/class_phoneAccount.inc index 0721be692..b4478f8bb 100644 --- a/plugins/gofon/phoneaccount/class_phoneAccount.inc +++ b/plugins/gofon/phoneaccount/class_phoneAccount.inc @@ -236,6 +236,11 @@ class phoneAccount extends plugin // Generate MySQL Syntax function generate_mysql_entension_entries($save = false){ + 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. ")); + return(true); + } + // Get Configuration for Mysql database Server $a_SETUP = $_SESSION['config']->data['SERVERS']['FON']; // DB Configuration $s_parameter = ""; // Contains paramter for selected Macro @@ -530,6 +535,7 @@ class phoneAccount extends plugin function execute() { + $display = ""; /* Do we represent a valid account? */ if (!$this->is_account && $this->parent == NULL){ $display= "\"\" ". @@ -548,18 +554,23 @@ class phoneAccount extends plugin $this->macro ="none"; } + /* Prepare templating */ + $smarty= get_smarty(); + /* tell user that the pluging selected is no longer available*/ if((!$this->macrostillavailable)&&($this->macro!="none")){ print_red(_("The macro you selected, is no longer available for you, please choose another one.")); } - /* Prepare templating */ - $smarty= get_smarty(); - /* Assing macroselectbox values */ $smarty->assign("macros",$this->macros); $smarty->assign("macro", $this->macro); + /* check if there is a FON server created */ + 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. ")); + } + /* Create parameter table, skip if no parameters given */ if(!isset($this->macroarray[$this->macro])){ $macrotab="";