From 2c1e3800ef41f2aabd61b7d6d39751d2d157409e Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Fri, 11 Jun 2010 14:57:39 -0700 Subject: Send back the REST API version as a header. It's on every request, which sucks, but it's totally unobtrusive because it's a header so that's ok. Decided that the current version is "3.0" although it will surely change before the final 3.0 release. Fixes ticket #1148 --- modules/rest/helpers/rest.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules/rest') diff --git a/modules/rest/helpers/rest.php b/modules/rest/helpers/rest.php index 72927c71..3229330a 100644 --- a/modules/rest/helpers/rest.php +++ b/modules/rest/helpers/rest.php @@ -18,9 +18,12 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class rest_Core { + const API_VERSION = "3.0"; + static function reply($data=array()) { Session::instance()->abort_save(); + header("X-Gallery-API-Version: " . rest::API_VERSION); if (Input::instance()->get("output") == "html") { header("Content-type: text/html"); if ($data) { -- cgit v1.2.3