From e0ec9dd76a62ad712b2a771a383f262557116753 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Fri, 14 Nov 2008 16:51:11 +0000 Subject: Allow the HTTP get method to be called without an id to create any empty template. --- core/controllers/item.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core/controllers/item.php') diff --git a/core/controllers/item.php b/core/controllers/item.php index 78ee7b0b..286eb66f 100644 --- a/core/controllers/item.php +++ b/core/controllers/item.php @@ -21,6 +21,10 @@ class Item_Controller extends REST_Controller { protected $resource_type = "item"; public function _get($item) { + if (empty($item)) { + // A null item is not allowed for albums or photos. + return Kohana::show_404(); + } // 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. -- cgit v1.2.3