summaryrefslogtreecommitdiff
path: root/modules/image_block/helpers/image_block_rest.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/image_block/helpers/image_block_rest.php')
-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) {