summaryrefslogtreecommitdiffstats
path: root/lib/class/song.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2010-02-14 00:56:07 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2010-02-14 00:56:07 +0000
commit8bc17dd3f0ed4dc520bb64b20dac8a31e72e447f (patch)
tree49fc67aaf19bfbc749c54d22522f31cfea8fabb5 /lib/class/song.class.php
parent704e66d0b489a7d3b0d4dcedc79515e5300732ff (diff)
downloadampache-8bc17dd3f0ed4dc520bb64b20dac8a31e72e447f.tar.gz
ampache-8bc17dd3f0ed4dc520bb64b20dac8a31e72e447f.tar.bz2
ampache-8bc17dd3f0ed4dc520bb64b20dac8a31e72e447f.zip
Tweaked how features / bandwidth level is checked, not happy with it.
Diffstat (limited to 'lib/class/song.class.php')
-rw-r--r--lib/class/song.class.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/class/song.class.php b/lib/class/song.class.php
index 6b68df94..2c9ed839 100644
--- a/lib/class/song.class.php
+++ b/lib/class/song.class.php
@@ -918,7 +918,7 @@ class Song extends database_object implements media {
* it uses the popular threshold to figure out how many to pull
* it will only return unique object
*/
- public static function get_recently_played($user_id='', $limit=null) {
+ public static function get_recently_played($user_id='') {
if ($user_id) {
$user_limit = " AND `object_count`.`user`='" . Dba::escape($user_id) . "'";
@@ -936,10 +936,7 @@ class Song extends database_object implements media {
while ($row = Dba::fetch_assoc($db_results)) {
if (isset($results[$row['object_id']])) { continue; }
$results[$row['object_id']] = $row;
- if (!is_null($limit))
- if (count($results) > $limit) { break; }
- else
- if (count($results) > Config::get('popular_threshold')) { break; }
+ if (count($results) > Config::get('popular_threshold')) { break; }
}
return $results;