summaryrefslogtreecommitdiffstats
path: root/lib/class/democratic.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-03-10 05:24:59 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-03-10 05:24:59 +0000
commit311ac991126f68b12a6a29747091544de4acf6a1 (patch)
tree3e52ca25f8ba905e635c996cf31eafaff599ddde /lib/class/democratic.class.php
parent01a5512c04512a0d08d8de05705d87d6c9fe46d3 (diff)
downloadampache-311ac991126f68b12a6a29747091544de4acf6a1.tar.gz
ampache-311ac991126f68b12a6a29747091544de4acf6a1.tar.bz2
ampache-311ac991126f68b12a6a29747091544de4acf6a1.zip
minor fixes to the playlist, fixed up the democratic playlist kinda, still does not work completely
Diffstat (limited to 'lib/class/democratic.class.php')
-rw-r--r--lib/class/democratic.class.php30
1 files changed, 28 insertions, 2 deletions
diff --git a/lib/class/democratic.class.php b/lib/class/democratic.class.php
index 32ecbee2..922120d2 100644
--- a/lib/class/democratic.class.php
+++ b/lib/class/democratic.class.php
@@ -374,6 +374,32 @@ class Democratic extends tmpPlaylist {
} // delete_votes
/**
+ * delete
+ * This deletes a democratic playlist
+ */
+ public static function delete($democratic_id) {
+
+ $democratic_id = Dba::escape($democratic_id);
+
+ $sql = "DELETE FROM `democratic` WHERE `id`='$democratic_id'";
+ $db_results = Dba::query($sql);
+
+ return true;
+
+ } // delete
+
+ /**
+ * update
+ * This updates an existing democratic playlist item. It takes a key'd array just like the create
+ */
+ public function update($data) {
+
+
+
+
+ } // update
+
+ /**
* create
* This is the democratic play create function it inserts this into the democratic table
*/
@@ -387,8 +413,8 @@ class Democratic extends tmpPlaylist {
$default = Dba::escape($data['make_default']);
$user = Dba::escape($GLOBALS['user']->id);
- $sql = "INSERT INTO `democratic` (`name`,`cooldown`,`level`,`user`,`primary`) " .
- "VALUES ('$name','$cool','$level','$user','$default')";
+ $sql = "INSERT INTO `democratic` (`name`,`base_playlist`,`cooldown`,`level`,`user`,`primary`) " .
+ "VALUES ('$name','$base','$cool','$level','$user','$default')";
$db_results = Dba::query($sql);
return $db_results;