diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2010-01-02 16:55:06 -0800 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2010-01-02 16:55:06 -0800 |
commit | 5b9801092b3c347161f9e3b8069e05945a5010d2 (patch) | |
tree | 170cf04d535d43a7d9180c821cdeca43d5520d08 /modules/gallery | |
parent | 07f8e256cf140c41e7eaf293c6c41b31aff8c661 (diff) |
Remove the Rest_Exception::trigger method.
Diffstat (limited to 'modules/gallery')
-rw-r--r-- | modules/gallery/helpers/gallery_rest.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/gallery/helpers/gallery_rest.php b/modules/gallery/helpers/gallery_rest.php index 563a2c7c..a87ebb4e 100644 --- a/modules/gallery/helpers/gallery_rest.php +++ b/modules/gallery/helpers/gallery_rest.php @@ -50,7 +50,7 @@ class gallery_rest_Core { static function put($request) { if (empty($request->arguments)) { - Rest_Exception::trigger(400, "Bad request"); + throw new Rest_Exception(400, "Bad request"); } $path = implode("/", $request->arguments); $item = gallery_rest::_get_item($path, "edit"); @@ -78,7 +78,7 @@ class gallery_rest_Core { static function post($request) { if (empty($request->arguments)) { - Rest_Exception::trigger(400, "Bad request"); + throw new Rest_Exception(400, "Bad request"); } $components = $request->arguments; @@ -125,15 +125,14 @@ class gallery_rest_Core { static function delete($request) { if (empty($request->arguments)) { - Rest_Exception::trigger(400, "Bad request", $log_message); - return rest::invalid_request(); + throw new Rest_Exception(400, "Bad request"); } $path = implode("/", $request->arguments); $item = gallery_rest::_get_item($path, "edit"); if ($item->id == 1) { - Rest_Exception::trigger(400, "Bad request", "Attempt to delete the root album"); + throw new Rest_Exception(400, "Bad request"); } $parent = $item->parent(); |