Popular function respects track limit

This commit is contained in:
Josef Citrine 2016-10-06 22:46:31 +01:00
parent 568969f7e5
commit 3fa85e9fe7

View file

@ -341,7 +341,7 @@ class Track extends Model implements Searchable, Commentable, Favouritable
'.$explicitFilter.' '.$explicitFilter.'
GROUP BY track_id GROUP BY track_id
ORDER BY weight DESC ORDER BY weight DESC
LIMIT 30;'; LIMIT '.$count;
$countQuery = DB::select(DB::raw($queryText)); $countQuery = DB::select(DB::raw($queryText));