diff options
Diffstat (limited to 'modules/rest')
-rw-r--r-- | modules/rest/helpers/rest.php | 3 | ||||
-rw-r--r-- | modules/rest/helpers/rest_event.php | 7 |
2 files changed, 10 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) { diff --git a/modules/rest/helpers/rest_event.php b/modules/rest/helpers/rest_event.php index e4e53ef6..f23b9a58 100644 --- a/modules/rest/helpers/rest_event.php +++ b/modules/rest/helpers/rest_event.php @@ -29,6 +29,13 @@ class rest_event { ->execute(); } + + static function change_provider($new_provider) { + db::build() + ->delete("user_access_keys") + ->execute(); + } + /** * Called after a user has been added. Just add a remote access key * on every add. |