summaryrefslogtreecommitdiffstats
path: root/lib/class
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-11-06 03:02:54 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-11-06 03:02:54 +0000
commitae97010e42c47115700b70d7e2d0789dda5deb94 (patch)
treee19ea1e6f48f2c47616d7e5c8cf8ac663cc7db07 /lib/class
parent81ad69915a9cc20e5527b251a0e0245a4e53877a (diff)
downloadampache-ae97010e42c47115700b70d7e2d0789dda5deb94.tar.gz
ampache-ae97010e42c47115700b70d7e2d0789dda5deb94.tar.bz2
ampache-ae97010e42c47115700b70d7e2d0789dda5deb94.zip
slight improvement to the democratic stuff and a stats fix
Diffstat (limited to 'lib/class')
-rw-r--r--lib/class/stats.class.php1
-rw-r--r--lib/class/tmp_playlist.class.php16
2 files changed, 17 insertions, 0 deletions
diff --git a/lib/class/stats.class.php b/lib/class/stats.class.php
index 004e7b46..ee4fb3aa 100644
--- a/lib/class/stats.class.php
+++ b/lib/class/stats.class.php
@@ -56,6 +56,7 @@ class Stats {
$type = $this->validate_type($type);
$oid = sql_escape($oid);
$user = sql_escape($user);
+ $date = time();
$sql = "INSERT INTO object_count (`object_type`,`object_id`,`date`,`user`) " .
" VALUES ('$type','$oid','$date','$user')";
diff --git a/lib/class/tmp_playlist.class.php b/lib/class/tmp_playlist.class.php
index 127ea2d0..52bcf4c5 100644
--- a/lib/class/tmp_playlist.class.php
+++ b/lib/class/tmp_playlist.class.php
@@ -187,6 +187,22 @@ class tmpPlaylist {
} // create
/**
+ * update_playlist
+ * This updates the base_playlist on this tmp_playlist
+ */
+ function update_playlist($playlist_id) {
+
+ $playlist_id = sql_escape($playlist_id);
+ $tmp_id = sql_escape($this->id);
+
+ $sql = "UPDATE tmp_playlist SET tmp_playlist.base_playlist='$playlist_id' WHERE id='$tmp_id'";
+ $db_results = mysql_query($sql,dbh());
+
+ return true;
+
+ } // update_playlist
+
+ /**
* delete
* This deletes any other tmp_playlists assoicated with this
* session