From d480778108d431b26a2e3413814380943d2d804d Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 13 Dec 2008 19:49:58 +0000 Subject: Don't have to check if the item is loaded now, access::can will guard against unloaded items --- modules/tag/controllers/tags.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') 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}")); -- cgit v1.2.3