From: hickert Date: Fri, 18 Nov 2005 06:11:05 +0000 (+0000) Subject: Fixed white page if mysql extension is missing X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b2362f5d2c7a414819a832b12613c330a4313683;p=gosa.git Fixed white page if mysql extension is missing git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1966 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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']);