From 5205eb9730fd56213fc303286ba93b71a7a79d88 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 18 Nov 2005 06:15:58 +0000 Subject: [PATCH] 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 --- plugins/gofon/macro/class_gofonMacro.inc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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']; -- 2.30.2