Code

Updated logview class
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 11 Sep 2008 11:44:18 +0000 (11:44 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 11 Sep 2008 11:44:18 +0000 (11:44 +0000)
-Use database name provided by the config class.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12423 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/log/addons/logview/class_logview.inc

index 6e441aa6fcba5773883b0862d246cdeb2391bee1..75f6ed3d394a1914562a6538b8cc054f38fa1648 100644 (file)
@@ -98,8 +98,8 @@ class logview extends plugin
       }
 
       /* check of log database is available */
-      if (! @mysql_select_db("gomon")){
-        msg_dialog::display(_("Error"), msgPool::dbselect("gomon",@mysql_error(),"Log view"), ERROR_DIALOG);
+      if (! @mysql_select_db($cfg["DB"])){
+        msg_dialog::display(_("Error"), msgPool::dbselect($cfg["DB"],@mysql_error(),"Log view"), ERROR_DIALOG);
         new log("debug","log view","dbselect",array(),@mysql_error());
         return ($smarty->fetch (get_template_path('contents.tpl', TRUE)));
       }
@@ -196,8 +196,8 @@ class logview extends plugin
       new log("debug","log view","dbconnect",array(),@mysql_error());
       return ($smarty->fetch (get_template_path('contents.tpl', TRUE)));
     } else {
-      if (! @mysql_select_db("gomon")){
-        msg_dialog::display(_("Error"), msgPool::dbselect("gomon",@mysql_error(),"Log view"), ERROR_DIALOG);
+      if (! @mysql_select_db($cfg["DB"])){
+        msg_dialog::display(_("Error"), msgPool::dbselect($cfg["DB"],@mysql_error(),"Log view"), ERROR_DIALOG);
         new log("debug","log view","dbselect",array(),@mysql_error());
         return ($smarty->fetch (get_template_path('contents.tpl', TRUE)));
       } else {