From: hickert Date: Wed, 14 Sep 2005 08:49:02 +0000 (+0000) Subject: Added check for goFonServer X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e6b50b96a4b383a85b2114dcc54372e656b64b0d;p=gosa.git Added check for goFonServer git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1359 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/ogroups/class_phonequeue.inc b/plugins/admin/ogroups/class_phonequeue.inc index 058cddade..9cefb8574 100644 --- a/plugins/admin/ogroups/class_phonequeue.inc +++ b/plugins/admin/ogroups/class_phonequeue.inc @@ -104,6 +104,8 @@ class phonequeue extends plugin $this->is_account= !$this->is_account; } + unset($_SESSION['config']->data['SERVERS']['FON']); + /* Show tab dialog headers */ if ($this->parent != NULL){ if ($this->is_account){ @@ -219,7 +221,12 @@ class phonequeue extends plugin { $SQL = array(); - + + if(!isset($_SESSION['config']->data['SERVERS']['FON'])){ + return(_("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(false); + } + // Get Configuration for Mysql database Server $a_SETUP = $_SESSION['config']->data['SERVERS']['FON']; $s_parameter =""; diff --git a/plugins/admin/ogroups/tabs_ogroups.inc b/plugins/admin/ogroups/tabs_ogroups.inc index 02593ea36..28718e287 100644 --- a/plugins/admin/ogroups/tabs_ogroups.inc +++ b/plugins/admin/ogroups/tabs_ogroups.inc @@ -22,15 +22,17 @@ class ogrouptabs extends tabs break; - case "U": - /* Append a PhoneQueue, if objectClass = goFonAccount */ - $use = false; + case "U": + /* Append a PhoneQueue, if objectClass = goFonAccount */ + $use = false; foreach($this->by_object['ogroup']->memberList as $dn => $val){ - if(in_array("goFonAccount",$val['objectClass'])){ - $use = true; + if(isset($val['objectClass'])){ + if(in_array("goFonAccount",$val['objectClass'])){ + $use = true; + } } } - + /* We found goFonAccount in users objectClasses*/ if($use){ require_once("class_phonequeue.inc"); diff --git a/plugins/gofon/macro/class_gofonMacro.inc b/plugins/gofon/macro/class_gofonMacro.inc index 2a809a9ec..ffc4076a2 100755 --- a/plugins/gofon/macro/class_gofonMacro.inc +++ b/plugins/gofon/macro/class_gofonMacro.inc @@ -16,7 +16,6 @@ class macro extends plugin /*! CLI vars */ var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser"); - /*! Macro attributes, */ var $generate_error= "";