diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2011-10-27 19:51:48 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2011-10-27 19:51:48 -0400 |
commit | 2d7a47a99be783c1933af0b24978dc2bbdfe9350 (patch) | |
tree | 8eefffd8cf1f3db2ce6efcb8e50846c943e6df61 /src/lib/DB.class.php | |
parent | db4376c0c1d5d2ea72696e6d73b469cb2dc30b91 (diff) | |
parent | 29a3ffb99435827d5a7ea6886ac22bd2ee18d593 (diff) |
Merge branch 'master' into multiuser-viewmultiuser-view
Conflicts:
src/controllers/Users.class.php
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; } |