summaryrefslogtreecommitdiffstats
path: root/lib/class/democratic.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2009-03-01 00:10:49 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2009-03-01 00:10:49 +0000
commit6777ec1e2ec97ab6986bf6657ed64283e0ad461c (patch)
tree7a6e024cf08f55c9126c22303b057525b4f96ec2 /lib/class/democratic.class.php
parenta3ff87240e1f1ad271ec611ed296fd978e22e702 (diff)
downloadampache-6777ec1e2ec97ab6986bf6657ed64283e0ad461c.tar.gz
ampache-6777ec1e2ec97ab6986bf6657ed64283e0ad461c.tar.bz2
ampache-6777ec1e2ec97ab6986bf6657ed64283e0ad461c.zip
first work on next db update, correct play_url() removing redundent path, fix democratic play clear
Diffstat (limited to 'lib/class/democratic.class.php')
-rw-r--r--lib/class/democratic.class.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/class/democratic.class.php b/lib/class/democratic.class.php
index 9e72251a..3088effa 100644
--- a/lib/class/democratic.class.php
+++ b/lib/class/democratic.class.php
@@ -336,9 +336,9 @@ class Democratic extends tmpPlaylist {
public function vote($items) {
/* Itterate through the objects if no vote, add to playlist and vote */
- foreach ($items as $type=>$object_id) {
- //FIXME: This is a hack until we fix everything else
- if (intval($type) == $type) { $type = 'song'; }
+ foreach ($items as $element) {
+ $type = array_shift($element);
+ $object_id = array_shift($element);
if (!$this->has_vote($object_id,$type)) {
$this->add_vote($object_id,$type);
}
@@ -541,8 +541,7 @@ class Democratic extends tmpPlaylist {
self::prune_tracks();
// Clean the votes
- self::clean_votes();
-
+ self::clear_votes();
return true;