diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-02-08 02:21:28 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-02-08 02:21:28 +0000 |
commit | 1fc2307faba7f280e9251de54504122a1dcb187e (patch) | |
tree | 3354dbca31ed92b50f0894deefe5154a0d0c7484 /core/helpers/MY_url.php | |
parent | 7ebbe189d4a6955532fb17f4cb9466115279ca35 (diff) |
rollback r20001-r19998, r19995. This may require a reinstall
Diffstat (limited to 'core/helpers/MY_url.php')
-rw-r--r-- | core/helpers/MY_url.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/helpers/MY_url.php b/core/helpers/MY_url.php index c5f2d16c..dd3682df 100644 --- a/core/helpers/MY_url.php +++ b/core/helpers/MY_url.php @@ -19,9 +19,9 @@ */ class url extends url_Core { static function site($uri, $protocol=false) { - $parts = explode("/", $uri, 3); - if ($parts[0] == "albums" || $parts[0] == "photos") { - $uri = ORM::factory("item", empty($parts[1]) ? 1 : $parts[1])->relative_path(); + list($controller, $arg1, $args) = explode("/", $uri, 3); + if ($controller == "albums" || $controller == "photos") { + $uri = ORM::factory("item", $arg1)->relative_path(); } return parent::site($uri, $protocol); } @@ -33,7 +33,7 @@ class url extends url_Core { $count = count(Router::$segments); foreach (ORM::factory("item") - ->where("path", Router::$segments[$count - 1]) + ->where("name", Router::$segments[$count - 1]) ->where("level", $count + 1) ->find_all() as $match) { if ($match->relative_path() == Router::$current_uri) { |