diff options
-rw-r--r-- | server/democratic.ajax.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/democratic.ajax.php b/server/democratic.ajax.php index 0d345119..41c541f1 100644 --- a/server/democratic.ajax.php +++ b/server/democratic.ajax.php @@ -34,7 +34,10 @@ switch ($_REQUEST['action']) { $show_browse = true; break; case 'add_vote': - $democratic->add_vote($_REQUEST['object_id'],$_REQUEST['type']); + // Only add the vote if they haven't already voted + if (!$democratic->has_vote($_GET['object_id'],$_GET['type'])) { + $democratic->add_vote($_REQUEST['object_id'],$_REQUEST['type']); + } $show_browse = true; break; case 'delete': |