From 01c5a2282962edc81946aad44a8d6ea823307dc6 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 18 Nov 2005 05:58:21 +0000 Subject: [PATCH] Fixed white pages if mysql extension is missing git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1964 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../class_phoneConferenceGeneric.inc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/plugins/gofon/conference/class_phoneConferenceGeneric.inc b/plugins/gofon/conference/class_phoneConferenceGeneric.inc index 17a191c06..555f5e3f9 100644 --- a/plugins/gofon/conference/class_phoneConferenceGeneric.inc +++ b/plugins/gofon/conference/class_phoneConferenceGeneric.inc @@ -40,6 +40,8 @@ class conference extends plugin var $goFonConferenceOwner = ""; + var $error_shown = false; + var $goFonConferenceOptionFormat = ""; var $goFonConferenceOptionLifetime = ""; var $telephoneNumber = ""; @@ -230,6 +232,15 @@ class conference extends plugin $a_SETUP = $_SESSION['config']->data['SERVERS']['FON']; // Connect to DB server + $r_con = false; + + if(!is_callable("mysql_pconnect")){ + if(!$this->error_shown){ + print_red(_("Can't save any changes to asterisk database, there is currently no mysql extension available in your php setup.")); + $this->error_shown = true; + } + return(true); + } $r_con = @mysql_pconnect($a_SETUP['SERVER'],$a_SETUP['LOGIN'],$a_SETUP['PASSWORD']); // Check if we are connected correctly @@ -333,6 +344,13 @@ class conference extends plugin } function SQL_remove_me($save){ + if(!is_callable("mysql_pconnect")){ + if(!$this->error_shown){ + print_red(_("Can't save any changes to asterisk database, there is currently no mysql extension available in your php setup.")); + $this->error_shown = true; + } + return(true); + } if($this->old_tele_number){ // Get Configuration for Mysql database Server -- 2.30.2