summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPaul Arthur <paul.arthur@flowerysong.com>2013-05-13 21:36:12 -0400
committerPaul Arthur <paul.arthur@flowerysong.com>2013-05-13 21:36:12 -0400
commit9a62b49341445f32f2f299f29f3a4340637ba93c (patch)
tree2d9e5ebb9bc56c0e2f6a297df4af6b267453a0c0 /lib
parent6e33efbe23d1791f182c428cd92ecc8935d3ca51 (diff)
downloadampache-9a62b49341445f32f2f299f29f3a4340637ba93c.tar.gz
ampache-9a62b49341445f32f2f299f29f3a4340637ba93c.tar.bz2
ampache-9a62b49341445f32f2f299f29f3a4340637ba93c.zip
Make Catalog::count_songs use the correct variable
Fixes GH#23
Diffstat (limited to 'lib')
-rw-r--r--lib/class/catalog.class.php2
1 files changed, 1 insertions, 1 deletions
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` ' .