diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-11-22 17:44:10 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-11-22 17:44:10 +0000 |
commit | 67cbb218cd89ac6be9d1d55ca3799080daac1f5a (patch) | |
tree | 9aabddaed61a0bda1e477cf44c69400d1590779f /lib/class/api.class.php | |
parent | d5ae71f551f0aebef1dbae518a116a1c86430ffb (diff) | |
download | ampache-67cbb218cd89ac6be9d1d55ca3799080daac1f5a.tar.gz ampache-67cbb218cd89ac6be9d1d55ca3799080daac1f5a.tar.bz2 ampache-67cbb218cd89ac6be9d1d55ca3799080daac1f5a.zip |
renamed xml-rpc acl to rpc, added default mime type of image/jpg and added config options for batch download to the fs, no garbage collection for non-completed downloads yet.
Diffstat (limited to 'lib/class/api.class.php')
-rw-r--r-- | lib/class/api.class.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/class/api.class.php b/lib/class/api.class.php index 1ebc86e8..592ae953 100644 --- a/lib/class/api.class.php +++ b/lib/class/api.class.php @@ -26,6 +26,8 @@ */ class Api { + public static $version = '340001'; + /** * constructor * This really isn't anything to do here, so it's private @@ -45,6 +47,11 @@ class Api { */ public static function handshake($timestamp,$passphrase,$ip,$username='') { + // If the timestamp is over 2hr old sucks to be them +// if ($timestamp < (time() - 7200)) { +// return 'Timestamp too old, try again'; +// } + // First we'll filter by username and IP if (!$username) { $user_id = '-1'; @@ -76,7 +83,8 @@ class Api { // Create the Session, in this class for now needs to be moved $token = self::create_session($row['level'],$ip,$user_id); debug_event('API','Login Success, passphrase matched','1'); - return $token; + + return array('auth'=>$token,'api'=>self::$version); } // match } // end while |