diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-01-04 05:37:15 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-01-04 05:37:15 +0000 |
commit | 1068c367ac5ee03fc799773289786863689da5bd (patch) | |
tree | 2df7950b9a110160233e22392526096ac2589550 /lib/class/user.class.php | |
parent | 560dbe70f23b4353b5d98736fb16dd088d4f269a (diff) | |
download | ampache-1068c367ac5ee03fc799773289786863689da5bd.tar.gz ampache-1068c367ac5ee03fc799773289786863689da5bd.tar.bz2 ampache-1068c367ac5ee03fc799773289786863689da5bd.zip |
* Fixed Single Artist view if you have 50+ albums
* Tweaked Recently Played text to make translations a little easier
* Removed unused Config options
* Added array definition if only one users exists
Diffstat (limited to 'lib/class/user.class.php')
-rw-r--r-- | lib/class/user.class.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/class/user.class.php b/lib/class/user.class.php index f4a00387..48d36a29 100644 --- a/lib/class/user.class.php +++ b/lib/class/user.class.php @@ -220,6 +220,9 @@ class User { "WHERE object_type='" . sql_escape($type) . "' AND user='" . sql_escape($this->id) . "'"; $db_results = mysql_query($sql,dbh()); + // Incase they only have one user + $users = array(); + while ($r = mysql_fetch_assoc($db_results)) { /* Store the fact that you rated this */ $key = $r['object_id']; @@ -242,8 +245,8 @@ class User { * sort the users[$key] array by value and then find things they've rated high (4+) that you * haven't rated */ - asort($users); $recommendations = array(); + asort($users); foreach ($users as $user_id=>$score) { |