summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdocs/CHANGELOG.md2
-rw-r--r--lib/class/rating.class.php2
2 files changed, 3 insertions, 1 deletions
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index 54130ede..8c66b4b6 100755
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -3,6 +3,8 @@ CHANGELOG
3.6-FUTURE
----------
+- Fixed issue that sometimes removed ratings after catalog operations (reported
+ by stebe)
- Fixed catalog song stats (reported by stebe)
- Fixed ACL text field length to allow entry of IPv6 addresses (reported
by Baggypants)
diff --git a/lib/class/rating.class.php b/lib/class/rating.class.php
index 1e983d42..921211df 100644
--- a/lib/class/rating.class.php
+++ b/lib/class/rating.class.php
@@ -55,7 +55,7 @@ class Rating extends database_object {
*/
public static function gc() {
foreach(array('song', 'album', 'artist', 'video') as $object_type) {
- Dba::write("DELETE FROM `rating` USING `rating` LEFT JOIN `$object_type` ON `$object_type`.`id` = `rating`.`object_type` WHERE `object_type` = '$object_type' AND `$object_type`.`id` IS NULL");
+ Dba::write("DELETE FROM `rating` USING `rating` LEFT JOIN `$object_type` ON `$object_type`.`id` = `rating`.`object_id` WHERE `object_type` = '$object_type' AND `$object_type`.`id` IS NULL");
}
}