summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorPaul Arthur <flowerysong00@yahoo.com>2012-10-12 15:42:07 -0400
committerPaul Arthur <paul.arthur@flowerysong.com>2012-10-15 13:20:28 -0400
commitbc90c0128c804252ff60c910658c5bc8218aef2b (patch)
treef6fcf30166a9fb8803387db53cd164a7a132b452 /server
parent8c4921f5f388f1f81000b2fbef9da35b0787e4d1 (diff)
downloadampache-bc90c0128c804252ff60c910658c5bc8218aef2b.tar.gz
ampache-bc90c0128c804252ff60c910658c5bc8218aef2b.tar.bz2
ampache-bc90c0128c804252ff60c910658c5bc8218aef2b.zip
Start cleaning up the democratic thing.
Whoever wrote the old implementation of get_items suffered from intense fear and hatred of SQL.
Diffstat (limited to 'server')
-rw-r--r--server/democratic.ajax.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/server/democratic.ajax.php b/server/democratic.ajax.php
index 5da5a126..2139c96b 100644
--- a/server/democratic.ajax.php
+++ b/server/democratic.ajax.php
@@ -40,10 +40,12 @@ switch ($_REQUEST['action']) {
$show_browse = true;
break;
case 'add_vote':
- // 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']);
- }
+ $democratic->add_vote(array(
+ array(
+ 'object_type' => $_REQUEST['type'],
+ 'object_id' => $_REQUEST['object_id']
+ )
+ ));
$show_browse = true;
break;
case 'delete':