diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-12-30 17:08:01 -0800 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-12-30 17:08:01 -0800 |
commit | 11792a12bb2002a434217efabe232022dd253b67 (patch) | |
tree | 4df434a962072dd092a4a2dfa03175ec7e916f0d /modules/tag/helpers | |
parent | e6111e616b5d6282b8aeb1d1b09fc6d064caafe8 (diff) |
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.
Diffstat (limited to 'modules/tag/helpers')
-rw-r--r-- | modules/tag/helpers/tag_rest.php | 6 |
1 files changed, 3 insertions, 3 deletions
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; |