From 364d34562bb31a4ece919c421fdccc601ad4523d Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 18 Nov 2005 06:06:33 +0000 Subject: [PATCH] Fixed white page if no mysql extension was present git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1965 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/addons/logview/class_logview.inc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/plugins/addons/logview/class_logview.inc b/plugins/addons/logview/class_logview.inc index d716acf47..e97f68b7e 100644 --- a/plugins/addons/logview/class_logview.inc +++ b/plugins/addons/logview/class_logview.inc @@ -36,7 +36,11 @@ class logview extends plugin print_red (_("No LOG servers defined!")); return; } - + + if(!is_callable("mysql_connect")){ + return; + } + $cfg= $this->config->data['SERVERS']['LOG']; $tmp= set_error_handler('dummy_error_handler'); $link = @mysql_pconnect($cfg['SERVER'], $cfg['LOGIN'], $cfg['PASSWORD']); @@ -94,6 +98,13 @@ class logview extends plugin return; } + if(!is_callable("mysql_connect")){ + print_red(_("There is no mysql extension available in your php setup, can't perform any query.")); + return; + } + + + /* Save data */ $logfilter= get_global("logfilter"); foreach( array("host", "time", "log_level", "regex") as $type){ -- 2.30.2