diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-02-29 06:14:46 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-02-29 06:14:46 +0000 |
commit | 2c337852cff31297d681fb87d3098cc3d9041101 (patch) | |
tree | 9853ce94387c4cc7756575598dfb1e2de44a8589 /lib/class/api.class.php | |
parent | c1f2b35e2a18b0752746f5db5794cf18714bc71d (diff) | |
download | ampache-2c337852cff31297d681fb87d3098cc3d9041101.tar.gz ampache-2c337852cff31297d681fb87d3098cc3d9041101.tar.bz2 ampache-2c337852cff31297d681fb87d3098cc3d9041101.zip |
major corrections to reading of preferences and a few misc fixes which I have now forgotten
Diffstat (limited to 'lib/class/api.class.php')
-rw-r--r-- | lib/class/api.class.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/class/api.class.php b/lib/class/api.class.php index f1ff7a33..bd1b7ce0 100644 --- a/lib/class/api.class.php +++ b/lib/class/api.class.php @@ -86,13 +86,19 @@ class Api { $data['type'] = 'api'; $data['value'] = $timestamp; $token = vauth::session_create($data); + // Insert the token into the streamer $stream = new Stream(); $stream->user_id = $client->id; $stream->insert_session($token); debug_event('API','Login Success, passphrase matched','1'); - return array('auth'=>$token,'api'=>self::$version); + // We need to also get the 'last update' of the catalog information in an RFC 2822 Format + $sql = "SELECT MAX(`last_update`) AS `update`,MAX(`last_add`) AS `add` FROM `catalog`"; + $db_results = Dba::query($sql); + $row = Dba::fetch_assoc($db_results); + + return array('auth'=>$token,'api'=>self::$version,'update'=>date("r",$row['update']),'add'=>date("r",$row['add'])); } // match } // end while |