diff options
Diffstat (limited to 'src/lib/DB.class.php')
-rw-r--r-- | src/lib/DB.class.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/DB.class.php b/src/lib/DB.class.php index 5954726..ac8dafe 100644 --- a/src/lib/DB.class.php +++ b/src/lib/DB.class.php @@ -1,7 +1,7 @@ <?php - require_once('Auth.class.php'); require_once('Login.class.php'); +require_once('Database.class.php'); class DB { public static function set($table, $unit, $key, $value, $orig_value) { @@ -65,8 +65,8 @@ class DB { } private static function user_get($uid, $key) { - $user = Auth::getObj($uid); - $logged_in_user = Auth::getObj(Login::isLoggedIn()); + $user = Auth::getInstance($uid); + $logged_in_user = Auth::getInstance(Login::isLoggedIn()); $post_key = $key."[$uid]"; @$value = $_POST[$post_key]; @@ -103,7 +103,7 @@ class DB { 'editable'=>$editable); } private static function user_set($uid, $key, $value) { - $user = Auth::getObj($uid); + $user = Auth::getInstance($uid); switch ($key) { case 'auth_uid': @@ -127,8 +127,8 @@ class DB { } private static function admin_get($plugin, $key) { - global $mm; $db = $mm->database(); - $user = Auth::getObj(Login::isLoggedIn()); + $db = Database::getInstance(); + $user = Auth::getInstance(Login::isLoggedIn()); if ($user->isAdmin()) { $editable = true; switch ($plugin) { @@ -149,8 +149,8 @@ class DB { 'editable'=>$editable); } private static function admin_set($plugin, $key, $value) { - global $mm; $db = $mm->database(); - $user = Auth::getObj(Login::isLoggedIn()); + $db = Database::getInstance(); + $user = Auth::getInstance(Login::isLoggedIn()); if (!$user->isAdmin()) { return false; } |