diff options
Diffstat (limited to 'lib/class/song.class.php')
-rw-r--r-- | lib/class/song.class.php | 7 |
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; |