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:
parent
6e33efbe23
commit
9a62b49341
2 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@ CHANGELOG
|
||||||
|
|
||||||
3.6-FUTURE
|
3.6-FUTURE
|
||||||
----------
|
----------
|
||||||
|
- Fixed catalog song stats (reported by stebe)
|
||||||
- Fixed ACL text field length to allow entry of IPv6 addresses (reported
|
- Fixed ACL text field length to allow entry of IPv6 addresses (reported
|
||||||
by Baggypants)
|
by Baggypants)
|
||||||
- Fixed regression preventing the use of an existing database during
|
- Fixed regression preventing the use of an existing database during
|
||||||
|
|
|
@ -347,7 +347,7 @@ class Catalog extends database_object {
|
||||||
* in this catalog.
|
* in this catalog.
|
||||||
*/
|
*/
|
||||||
public static function count_songs($id = null) {
|
public static function count_songs($id = null) {
|
||||||
$where_sql = $catalog_id ? 'WHERE `catalog` = ?' : '';
|
$where_sql = $id ? 'WHERE `catalog` = ?' : '';
|
||||||
$params = $id ? array($id) : null;
|
$params = $id ? array($id) : null;
|
||||||
|
|
||||||
$sql = 'SELECT COUNT(`id`), SUM(`time`), SUM(`size`) FROM `song` ' .
|
$sql = 'SELECT COUNT(`id`), SUM(`time`), SUM(`size`) FROM `song` ' .
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue