diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-06-11 14:57:39 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-06-11 14:59:17 -0700 |
commit | 2c1e3800ef41f2aabd61b7d6d39751d2d157409e (patch) | |
tree | 422a84e814b546277667fb5c290ad581e134b663 /modules/rest/helpers | |
parent | bb35aefffbc287efc9823abd4b0e451b86c37378 (diff) |
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
Diffstat (limited to 'modules/rest/helpers')
-rw-r--r-- | modules/rest/helpers/rest.php | 3 |
1 files changed, 3 insertions, 0 deletions
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) { |