From 7eedf6e694ac1d2186f0e81a83a9b718a6577a3a Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Tue, 10 Dec 2013 08:18:27 +0100 Subject: [PATCH] add logger to dbmanager, thx Sephi Signed-off-by: Michael Kaufmann (d00p) --- admin_customers.php | 4 ++-- customer_mysql.php | 4 ++-- lib/functions/database/function.correctMysqlUsers.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/admin_customers.php b/admin_customers.php index deff50eb..18fd430a 100644 --- a/admin_customers.php +++ b/admin_customers.php @@ -247,7 +247,7 @@ if ($page == 'customers' Database::needRoot(true); $last_dbserver = 0; - $dbm = new DbManager($settings); + $dbm = new DbManager($settings, $log); while ($row_database = $databases_stmt->fetch(PDO::FETCH_ASSOC)) { @@ -1378,7 +1378,7 @@ if ($page == 'customers' Database::needRoot(true); $last_dbserver = 0; - $dbm = new DbManager($settings); + $dbm = new DbManager($settings, $log); // For each of them while ($row_database = $databases_stmt->fetch(PDO::FETCH_ASSOC)) { diff --git a/customer_mysql.php b/customer_mysql.php index c64336cd..96872f99 100644 --- a/customer_mysql.php +++ b/customer_mysql.php @@ -109,7 +109,7 @@ if ($page == 'overview') { if (isset($_POST['send']) && $_POST['send'] == 'send') { // Begin root-session Database::needRoot(true, $result['dbserver']); - $dbm = new DbManager($settings); + $dbm = new DbManager($settings, $log); $dbm->getManager()->deleteDatabase($result['databasename']); $log->logAction(USR_ACTION, LOG_INFO, "deleted database '" . $result['databasename'] . "'"); Database::needRoot(false); @@ -171,7 +171,7 @@ if ($page == 'overview') { $databasedescription = validate(trim($_POST['description']), 'description'); // create database, user, set permissions, etc.pp. - $dbm = new DbManager($settings); + $dbm = new DbManager($settings, $log); $username = $dbm->createDatabase( $userinfo['loginname'], $password, diff --git a/lib/functions/database/function.correctMysqlUsers.php b/lib/functions/database/function.correctMysqlUsers.php index 98e94378..a3a2ce83 100644 --- a/lib/functions/database/function.correctMysqlUsers.php +++ b/lib/functions/database/function.correctMysqlUsers.php @@ -19,7 +19,7 @@ function correctMysqlUsers($mysql_access_host_array) { - global $settings; + global $settings, $log; // get sql-root access data Database::needRoot(true); @@ -36,7 +36,7 @@ function correctMysqlUsers($mysql_access_host_array) { Database::needSqlData(); $sql_root = Database::getSqlData(); - $dbm = new DbManager($settings); + $dbm = new DbManager($settings, $log); $users = $dbm->getManager()->getAllSqlUsers(false); $databases = array(