From 11792a12bb2002a434217efabe232022dd253b67 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Wed, 30 Dec 2009 17:08:01 -0800 Subject: 1) Remove the rest::not_found method and replace it with "throw new Kohana_404_Exception 2) Don't use the input path to lookup the item via relative_path_cache. Instead use url::get_item_from_uri method. --- modules/tag/helpers/tag_rest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/tag/helpers') diff --git a/modules/tag/helpers/tag_rest.php b/modules/tag/helpers/tag_rest.php index ed6cfc1c..cfcf93b2 100644 --- a/modules/tag/helpers/tag_rest.php +++ b/modules/tag/helpers/tag_rest.php @@ -70,11 +70,11 @@ class tag_rest_Core { ->viewable() ->find(); if (!$item->loaded()) { - return rest::not_found("Resource: {$path} missing."); + throw new Kohana_404_Exception(); } if (!access::can("edit", $item)) { - return rest::not_found("Resource: {$path} permission denied."); + throw new Kohana_404_Exception(); } foreach ($tags as $tag) { @@ -94,7 +94,7 @@ class tag_rest_Core { ->where("name", "=", $name) ->find(); if (!$tag->loaded()) { - return rest::not_found("Tag: {$name} not found."); + throw new Kohana_404_Exception(); } $tag->name = $request->new_name; -- cgit v1.2.3