From 67cbb218cd89ac6be9d1d55ca3799080daac1f5a Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Thu, 22 Nov 2007 17:44:10 +0000 Subject: 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. --- lib/class/api.class.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/class/api.class.php') 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 -- cgit