1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-06 03:49:56 +02:00

Make Catalog::count_songs use the correct variable

Fixes GH#23
This commit is contained in:
Paul Arthur 2013-05-13 21:36:12 -04:00
parent 6e33efbe23
commit 9a62b49341
2 changed files with 2 additions and 1 deletions

View file

@ -347,7 +347,7 @@ class Catalog extends database_object {
* in this catalog.
*/
public static function count_songs($id = null) {
$where_sql = $catalog_id ? 'WHERE `catalog` = ?' : '';
$where_sql = $id ? 'WHERE `catalog` = ?' : '';
$params = $id ? array($id) : null;
$sql = 'SELECT COUNT(`id`), SUM(`time`), SUM(`size`) FROM `song` ' .