summaryrefslogtreecommitdiff
path: root/core/helpers/MY_url.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/helpers/MY_url.php')
-rw-r--r--core/helpers/MY_url.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/helpers/MY_url.php b/core/helpers/MY_url.php
index 5f683638..67e9a0aa 100644
--- a/core/helpers/MY_url.php
+++ b/core/helpers/MY_url.php
@@ -26,9 +26,9 @@ class url extends url_Core {
$query = "";
}
- list($controller, $arg1, $args) = explode("/", $uri, 3);
- if ($controller == "albums" || $controller == "photos") {
- $uri = ORM::factory("item", $arg1)->relative_path();
+ $parts = explode("/", $uri, 3);
+ if ($parts[0] == "albums" || $parts[0] == "photos") {
+ $uri = ORM::factory("item", $parts[1])->relative_path();
}
return parent::site($uri . $query, $protocol);
}