From 0e1e087655f05f0629a54cad98ed3fbe8a6e0484 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Tue, 22 Apr 2008 03:09:45 +0000 Subject: fixed remove vote removing all votes regardless on democratic play --- docs/CHANGELOG | 4 ++++ lib/class/democratic.class.php | 4 ++-- server/democratic.ajax.php | 2 +- templates/show_xspf_player.inc.php | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/CHANGELOG b/docs/CHANGELOG index 6e31681e..36cb3bae 100755 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -2,6 +2,10 @@ --------- Ampache -- CHANGELOG --------- -------------------------------------------------------------------------- +-------------------------------------------------------------------------- + v.3.4 + - Fixed Remove one vote, removes all votes on democratic play + -------------------------------------------------------------------------- v.3.4-Beta3 04/20/2008 - Fixed Rating display and Rating Advanced Search diff --git a/lib/class/democratic.class.php b/lib/class/democratic.class.php index e91abb45..b8835766 100644 --- a/lib/class/democratic.class.php +++ b/lib/class/democratic.class.php @@ -1,7 +1,7 @@ id); - $sql = "DELETE FROM `user_vote` WHERE `object_id`='$object_id'"; + $sql = "DELETE FROM `user_vote` WHERE `object_id`='$object_id' AND `user`='$user_id'"; $db_results = Dba::query($sql); /* Clean up anything that has no votes */ diff --git a/server/democratic.ajax.php b/server/democratic.ajax.php index ccb22b9c..97da2aaa 100644 --- a/server/democratic.ajax.php +++ b/server/democratic.ajax.php @@ -1,7 +1,7 @@