summaryrefslogtreecommitdiffstats
path: root/lib/class/stream.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-12-24 01:28:07 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-12-24 01:28:07 +0000
commit34b92d2dd5da0298f9d27a230ca3ffa2da061d36 (patch)
treeba4a2bf5b17c093a8127317087272e2117fcff45 /lib/class/stream.class.php
parent3d8ff28ac56f30075bd9c485e2ee94f486717e6f (diff)
downloadampache-34b92d2dd5da0298f9d27a230ca3ffa2da061d36.tar.gz
ampache-34b92d2dd5da0298f9d27a230ca3ffa2da061d36.tar.bz2
ampache-34b92d2dd5da0298f9d27a230ca3ffa2da061d36.zip
fixed now playing for the API and lack of session extend when using the API
Diffstat (limited to 'lib/class/stream.class.php')
-rw-r--r--lib/class/stream.class.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/class/stream.class.php b/lib/class/stream.class.php
index 7a925daa..179e9eed 100644
--- a/lib/class/stream.class.php
+++ b/lib/class/stream.class.php
@@ -114,12 +114,14 @@ class Stream {
* insert_session
* This inserts a row into the session_stream table
*/
- private function insert_session() {
+ public function insert_session($sid='') {
+
+ $sid = $sid ? Dba::escape($sid) : Dba::escape(self::$session);
$expire = time() + Config::get('stream_length');
$sql = "INSERT INTO `session_stream` (`id`,`expire`,`user`) " .
- "VALUES('" . self::$session . "','$expire','$this->user_id')";
+ "VALUES('$sid','$expire','$this->user_id')";
$db_results = Dba::query($sql);
if (!$db_results) { return false; }