summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-12-23 09:32:32 -0800
committerTim Almdal <tnalmdal@shaw.ca>2009-12-23 09:32:32 -0800
commitd622d1aa4f3b7c844de2f29cca2e04d9bb56bb86 (patch)
tree1c1b0a2a93b95d791d6807b622fac950bdf9064d /modules/gallery/helpers
parentb8ee6f25bdd9372dccd4552ca29cf6f2857e8164 (diff)
Updated the unit tests to match the current API
Corrected a problem identified with the unit tests... failed if the path was empty on PUT.
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r--modules/gallery/helpers/gallery_rest.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gallery/helpers/gallery_rest.php b/modules/gallery/helpers/gallery_rest.php
index a3b1997d..a052ae64 100644
--- a/modules/gallery/helpers/gallery_rest.php
+++ b/modules/gallery/helpers/gallery_rest.php
@@ -58,6 +58,10 @@ class gallery_rest_Core {
}
static function put($request) {
+ if (empty($request->path)) {
+ return rest::invalid_request();
+ }
+
$item = ORM::factory("item")
->where("relative_url_cache", $request->path)
->viewable()