From ae97010e42c47115700b70d7e2d0789dda5deb94 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Mon, 6 Nov 2006 03:02:54 +0000 Subject: slight improvement to the democratic stuff and a stats fix --- lib/class/stats.class.php | 1 + lib/class/tmp_playlist.class.php | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) (limited to 'lib/class') 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 @@ -186,6 +186,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 -- cgit