From: hickert Date: Fri, 18 Nov 2005 06:15:58 +0000 (+0000) Subject: Fixed white page if no mysql extension is available X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5205eb9730fd56213fc303286ba93b71a7a79d88;p=gosa.git Fixed white page if no mysql extension is available git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1967 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/gofon/macro/class_gofonMacro.inc b/plugins/gofon/macro/class_gofonMacro.inc index fc25fac0a..051675f87 100755 --- a/plugins/gofon/macro/class_gofonMacro.inc +++ b/plugins/gofon/macro/class_gofonMacro.inc @@ -21,7 +21,10 @@ class macro extends plugin /*! The name of the Macro in the openldap drirectory */ var $cn = ""; - + + /*! Display error once */ + var $error_shown = false; + /*! This ist the variable that contains the description of the macro*/ var $description = ""; @@ -180,6 +183,14 @@ class macro extends plugin return(true); } + if(!is_callable("mysql_connect")){ + if((!$this->error_shown)&&($save)){ + print_red(_("There is no mysql extension available in your php setup, can't save any changes to asterisk db.")); + $this->error_shown = true; + } + return(true); + } + // Get Configuration for Mysql database Server $a_SETUP = $_SESSION['config']->data['SERVERS']['FON'];