From c6b7c9bb835f1d6690019f9cdf46c7576996b525 Mon Sep 17 00:00:00 2001 From: shish Date: Thu, 12 Jul 2007 07:37:32 +0000 Subject: [PATCH] remove ambiguous database->get_user(...) git-svn-id: file:///home/shish/svn/shimmie2/trunk@263 7f39781d-f577-437e-ae19-be835c7a54ca --- core/database.class.php | 9 --------- core/image.class.php | 2 +- core/util.inc.php | 2 +- ext/user/main.php | 2 +- 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/core/database.class.php b/core/database.class.php index 100708a6..55e2c3ad 100644 --- a/core/database.class.php +++ b/core/database.class.php @@ -306,15 +306,6 @@ class Database { // users {{{ var $SELECT_USER = "SELECT *,(unix_timestamp(now()) - unix_timestamp(joindate))/(60*60*24) AS days_old FROM users "; - public function get_user($a=false, $b=false) { - if($b == false) { - return $this->get_user_by_id($a); - } - else { - return $this->get_user_by_name_and_hash($a, $b); - } - } - public function get_user_session($name, $session) { $row = $this->db->GetRow("{$this->SELECT_USER} WHERE name LIKE ? AND md5(concat(pass, ?)) = ?", array($name, $_SERVER['REMOTE_ADDR'], $session)); diff --git a/core/image.class.php b/core/image.class.php index 3fa91ea6..26b7ee58 100644 --- a/core/image.class.php +++ b/core/image.class.php @@ -70,7 +70,7 @@ class Image { public function get_owner() { global $database; - return $database->get_user($this->owner_id); + return $database->get_user_by_id($this->owner_id); } public function get_tag_array() { diff --git a/core/util.inc.php b/core/util.inc.php index efa245d4..5fb34873 100644 --- a/core/util.inc.php +++ b/core/util.inc.php @@ -389,7 +389,7 @@ function _get_user() { } if(is_null($user)) { - $user = $database->get_user($config->get_int("anon_id", 0)); + $user = $database->get_user_by_id($config->get_int("anon_id", 0)); } assert(!is_null($user)); return $user; diff --git a/ext/user/main.php b/ext/user/main.php index 393f8b67..7bb68603 100644 --- a/ext/user/main.php +++ b/ext/user/main.php @@ -97,7 +97,7 @@ class UserPage extends Extension { $addr = $_SERVER['REMOTE_ADDR']; $hash = md5( strtolower($name) . $pass ); - $duser = $database->get_user($name, $hash); + $duser = $database->get_user_by_name_and_hash($name, $hash); if(!is_null($duser)) { $user = $duser;