summaryrefslogtreecommitdiffstats
path: root/lib/class/api.class.php
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 /lib/class/api.class.php
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 'lib/class/api.class.php')
-rw-r--r--lib/class/api.class.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/class/api.class.php b/lib/class/api.class.php
index 75fc2a27..2170532c 100644
--- a/lib/class/api.class.php
+++ b/lib/class/api.class.php
@@ -681,7 +681,12 @@ class Api {
echo xmlData::error('400', T_('Media Object Invalid or Not Specified'));
break;
}
- $democratic->vote(array(array('song',$media->id)));
+ $democratic->add_vote(array(
+ array(
+ 'object_type' => 'song',
+ 'object_id' => $media->id
+ )
+ ));
// If everything was ok
$xml_array = array('action'=>$input['action'],'method'=>$input['method'],'result'=>true);