summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdocs/CHANGELOG.md1
-rw-r--r--lib/class/catalog.class.php2
2 files changed, 2 insertions, 1 deletions
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index 4a41c7bd..54130ede 100755
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -3,6 +3,7 @@ CHANGELOG
3.6-FUTURE
----------
+- Fixed catalog song stats (reported by stebe)
- Fixed ACL text field length to allow entry of IPv6 addresses (reported
by Baggypants)
- Fixed regression preventing the use of an existing database during
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` ' .