From 9a62b49341445f32f2f299f29f3a4340637ba93c Mon Sep 17 00:00:00 2001 From: Paul Arthur Date: Mon, 13 May 2013 21:36:12 -0400 Subject: Make Catalog::count_songs use the correct variable Fixes GH#23 --- lib/class/catalog.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/class') diff --git a/lib/class/catalog.class.php b/lib/class/catalog.class.php index 1e2878bf..7d5d4746 100644 --- a/lib/class/catalog.class.php +++ b/lib/class/catalog.class.php @@ -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` ' . -- cgit