diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-12-01 19:44:29 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-12-01 19:44:29 -0800 |
commit | c803cb29091d3b069077d7711a2485f75f274835 (patch) | |
tree | f0ebcdacf6d749e6e2ebc47be4634a7eb13c2d5d /modules/gallery/controllers/items.php | |
parent | 53df0df0a4f9d2d5369016a7e2ea983ffe202346 (diff) | |
parent | 6fa880777cb3b61c0e380ebd5e7b83de55a8d6d4 (diff) |
Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev
Diffstat (limited to 'modules/gallery/controllers/items.php')
-rw-r--r-- | modules/gallery/controllers/items.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/gallery/controllers/items.php b/modules/gallery/controllers/items.php index 86782469..f261e3a9 100644 --- a/modules/gallery/controllers/items.php +++ b/modules/gallery/controllers/items.php @@ -23,10 +23,12 @@ class Items_Controller extends Controller { if (!$item->loaded()) { throw new Kohana_404_Exception(); } + // Redirect to the more specific resource type, since it will render - // differently. We could also just delegate here, but it feels more appropriate - // to have a single canonical resource mapping. + // differently. We can't delegate here because we may have gotten to this + // page via /items/<id> which means that we don't have a type-specific controller. Also, we + // want to drive a single canonical resource mapping where possible. access::required("view", $item); - return $this->_show($item); + url::redirect($item->abs_url()); } } |