Code

Just display mysql error message if there is an active phone account
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 18 Apr 2007 09:06:27 +0000 (09:06 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 18 Apr 2007 09:06:27 +0000 (09:06 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6078 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/gofon/phoneaccount/class_phoneAccount.inc

index ff643f9fcacc5e1ac2f23c3435c0298eabefcb43..a92672422ac42e8b202f789cd8d7a2a308fe2c15 100644 (file)
@@ -78,16 +78,21 @@ class phoneAccount extends plugin
      *  and first server as default if necessary.
      * Check if connection is successfull for the selected server $this->goFonHomeServer
      */
+
+  
+    /* Set available server */
+    if(isset($_SESSION['config']->data['SERVERS']['FON'])){
+      $this->goFonHomeServers = $_SESSION['config']->data['SERVERS']['FON'];
+    }
+
     $a_SETUP= array();
-    if(array_key_exists('config',$_SESSION) &&
+    if($this->is_account &&
+       array_key_exists('config',$_SESSION) &&
        array_key_exists('SERVERS',$_SESSION['config']->data) &&
        array_key_exists('FON',$_SESSION['config']->data['SERVERS']) &&
        is_callable("mysql_connect")
        ) {
 
-      /* Set available server */
-      $this->goFonHomeServers = $_SESSION['config']->data['SERVERS']['FON'];
-
       /* Servers defined? Watch here... */
       if (count($this->goFonHomeServers)){