Code

Fixed white page if mysql extension was missing
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 18 Nov 2005 06:19:47 +0000 (06:19 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 18 Nov 2005 06:19:47 +0000 (06:19 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1968 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/gofon/reports/class_fonreport.inc

index 1c20d9112be5e6c79a9137c1910994e0a7dfa81c..a2ef80dcf3ffd31fb2eefd30996785d566a8b5e8 100644 (file)
@@ -138,6 +138,12 @@ class fonreport extends plugin
        if (!isset($this->config->data['SERVERS']['FON'])){
                return ("");
        }
+
+       if(!is_callable("mysql_connect")){
+               print_red("There is no mysql extension available.");
+               return;
+       }
+
        $cfg= $this->config->data['SERVERS']['FON'];
        $link = @mysql_pconnect($cfg['SERVER'], $cfg['LOGIN'], $cfg['PASSWORD']);
        if ($link === FALSE){