summaryrefslogtreecommitdiffstats
path: root/lib/class/democratic.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2009-03-13 03:15:09 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2009-03-13 03:15:09 +0000
commitb92109a64fe2fca1520be0536f8092e2f50ef8f4 (patch)
tree9157861555c44e2135cd42e1aec3d0da28d390cd /lib/class/democratic.class.php
parent8398183bf5a383cee7da656fd116457c799678f7 (diff)
downloadampache-b92109a64fe2fca1520be0536f8092e2f50ef8f4.tar.gz
ampache-b92109a64fe2fca1520be0536f8092e2f50ef8f4.tar.bz2
ampache-b92109a64fe2fca1520be0536f8092e2f50ef8f4.zip
put supplemental object support back into the browse object for now, replace later
Diffstat (limited to 'lib/class/democratic.class.php')
-rw-r--r--lib/class/democratic.class.php17
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/class/democratic.class.php b/lib/class/democratic.class.php
index 88bd5439..b41e1524 100644
--- a/lib/class/democratic.class.php
+++ b/lib/class/democratic.class.php
@@ -77,6 +77,18 @@ class Democratic extends tmpPlaylist {
} // build_vote_cache
/**
+ * is_enabled
+ * This function just returns true / false if the current democraitc playlist
+ * is currently enabled / configured
+ */
+ public function is_enabled() {
+
+ if ($this->tmp_playlist) { return true; }
+
+ return false;
+
+ } // is_enabled
+ /**
* set_parent
* This returns the tmpPlaylist for this democratic play instance
*/
@@ -208,7 +220,6 @@ class Democratic extends tmpPlaylist {
// Extra set of data for caching!
$this->object_ids[] = $results['object_id'];
$this->vote_ids[] = $results['vote_id'];
- $this->user_votes[$results['vote_id']][] = $results['user'];
// First build a variable that holds the number of votes for an object
$name = 'vc_' . $results['object_id'];
@@ -226,10 +237,6 @@ class Democratic extends tmpPlaylist {
$items[$primary_key][$secondary_key][$results['id']] = array('object_id'=>$results['object_id'],'object_type'=>$results['object_type'],'id'=>$results['id']);
} // gather data
- foreach ($this->user_votes as $key=>$data) {
- parent::add_to_cache('democratic_voters',$key,$data);
- }
-
// Sort highest voted stuff to the top
krsort($items);