summaryrefslogtreecommitdiff
path: root/modules/image_block/helpers
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-12-23 13:13:03 -0800
committerTim Almdal <tnalmdal@shaw.ca>2009-12-23 13:13:03 -0800
commitd0dd6650bea15a30a2da66f996980a269a5f9c44 (patch)
tree5c0b8e9c30f6a7435f00dea9c4de04bfe31d8b33 /modules/image_block/helpers
parentd622d1aa4f3b7c844de2f29cca2e04d9bb56bb86 (diff)
When normalizing the rest request don't assume that the additional arguments are acutall a path. Leave it up to the handler to determine.
Diffstat (limited to 'modules/image_block/helpers')
-rw-r--r--modules/image_block/helpers/image_block_rest.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/image_block/helpers/image_block_rest.php b/modules/image_block/helpers/image_block_rest.php
index eca74941..363eabee 100644
--- a/modules/image_block/helpers/image_block_rest.php
+++ b/modules/image_block/helpers/image_block_rest.php
@@ -19,7 +19,8 @@
*/
class image_block_rest_Core {
static function get($request) {
- switch ($request->path) {
+ $path = implode("/", $request->arguments);
+ switch ($path) {
case "random":
$random = ((float)mt_rand()) / (float)mt_getrandmax();
@@ -41,7 +42,7 @@ class image_block_rest_Core {
}
break;
default:
- return rest::fail("Unsupported block type: '{$request->path}'");
+ return rest::fail("Unsupported block type: '{$path}'");
}
if ($items->count() > 0) {