From 852653ef2415dc070c27ce151ed399525ddfa5a0 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 30 Nov 2009 11:10:58 -0800 Subject: Clean up item routing a bit. 1) The new default route is "albums", and Albums_Controller::index() does the right thing 2) Items_Controller redirects to the appropriate specific controller 3) All item controllers now have show() instead of _show(), so that the routing code in url::parse_url() can get to it. But that code is protected against receiving bogus requests. --- modules/gallery/helpers/MY_url.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/gallery/helpers') diff --git a/modules/gallery/helpers/MY_url.php b/modules/gallery/helpers/MY_url.php index 368c947e..139aec21 100644 --- a/modules/gallery/helpers/MY_url.php +++ b/modules/gallery/helpers/MY_url.php @@ -35,7 +35,8 @@ class url extends url_Core { if ($item && $item->loaded) { Router::$controller = "{$item->type}s"; Router::$controller_path = MODPATH . "gallery/controllers/{$item->type}s.php"; - Router::$method = $item->id; + Router::$method = "show"; + Router::$arguments = array($item); } } -- cgit v1.2.3