From b2362f5d2c7a414819a832b12613c330a4313683 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 18 Nov 2005 06:11:05 +0000 Subject: [PATCH] Fixed white page if mysql extension is missing git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1966 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/gofax/reports/class_faxreport.inc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plugins/gofax/reports/class_faxreport.inc b/plugins/gofax/reports/class_faxreport.inc index fe0153c41..0bddbf0ed 100644 --- a/plugins/gofax/reports/class_faxreport.inc +++ b/plugins/gofax/reports/class_faxreport.inc @@ -95,6 +95,12 @@ class faxreport extends plugin /* Connecting, selecting database */ $cfg= $this->config->data['SERVERS']['FAX']; + + if(!is_callable("mysql_connect")){ + print_red(_("There is no mysql extension available, please check your php setup.")); + return; + } + $link = @mysql_pconnect($cfg['SERVER'], $cfg['LOGIN'], $cfg['PASSWORD']); if ($link === FALSE){ print_red(_("Can't connect to fax database, no reports can be shown!")); @@ -200,6 +206,11 @@ class faxreport extends plugin "WHERE ( ".$this->userfilter." ) AND queuing_time <= $end AND ". "queuing_time >= $start ORDER BY ".$this->fields[$this->sort]." $desc;"; + if(!is_callable("mysql_connect")){ + print_red("There is no mysql extension configured in your php setup."); + return; + } + /* Connecting, selecting database */ $cfg= $this->config->data['SERVERS']['FAX']; $link = @mysql_pconnect($cfg['SERVER'], $cfg['LOGIN'], $cfg['PASSWORD']); -- 2.30.2