summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-12-13 19:49:58 +0000
committerBharat Mediratta <bharat@menalto.com>2008-12-13 19:49:58 +0000
commitd480778108d431b26a2e3413814380943d2d804d (patch)
treec25931ab0bbe94f05608058987cc13422ae65798
parent8ba5ea3cf832f42e93e98c3b984962ace3abf2d1 (diff)
Don't have to check if the item is loaded now, access::can will guard against unloaded items
-rw-r--r--modules/tag/controllers/tags.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/tag/controllers/tags.php b/modules/tag/controllers/tags.php
index 625f1ac6..987cd69f 100644
--- a/modules/tag/controllers/tags.php
+++ b/modules/tag/controllers/tags.php
@@ -54,7 +54,7 @@ class Tags_Controller extends REST_Controller {
$form = tag::get_add_form($this->input->post('item_id'));
if ($form->validate()) {
$item = ORM::factory("item", $this->input->post("item_id"));
- if ($item->loaded && access::can("edit", $item)) {
+ if (access::can("edit", $item)) {
tag::add($item, $this->input->post("tag_name"));
rest::http_status(rest::CREATED);
rest::http_location(url::site("tags/{$tag->id}"));