From 582f41e2c16a5235c8315071a4c4d8352ec209d6 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 28 Nov 2011 09:35:13 +0400 Subject: [PATCH] implement getApiLevel --- api/index.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api/index.php b/api/index.php index 333eb0dc..e00ca097 100644 --- a/api/index.php +++ b/api/index.php @@ -7,6 +7,8 @@ require_once "../db-prefs.php"; require_once "../functions.php"; + define('API_LEVEL', 1); + define('API_STATUS_OK', 0); define('API_STATUS_ERR', 1); @@ -78,6 +80,11 @@ print api_wrap_reply(API_STATUS_OK, $seq, $rv); break; + case "getApiLevel": + $rv = array("level" => API_LEVEL); + print api_wrap_reply(API_STATUS_OK, $seq, $rv); + break; + case "login": $login = db_escape_string($_REQUEST["user"]); $password = $_REQUEST["password"]; -- 2.39.5