summaryrefslogtreecommitdiff
path: root/modules/tag/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'modules/tag/helpers')
-rw-r--r--modules/tag/helpers/item_tags_rest.php2
-rw-r--r--modules/tag/helpers/tag_item_rest.php4
-rw-r--r--modules/tag/helpers/tag_items_rest.php2
-rw-r--r--modules/tag/helpers/tag_rest.php2
4 files changed, 5 insertions, 5 deletions
diff --git a/modules/tag/helpers/item_tags_rest.php b/modules/tag/helpers/item_tags_rest.php
index ce814f77..43e2cef0 100644
--- a/modules/tag/helpers/item_tags_rest.php
+++ b/modules/tag/helpers/item_tags_rest.php
@@ -50,7 +50,7 @@ class item_tags_rest_Core {
}
static function resolve($id) {
- $item = ORM::factory("item")->where("id", "=", $id)->find();
+ $item = ORM::factory("item", $id);
if (!access::can("view", $item)) {
throw new Kohana_404_Exception();
}
diff --git a/modules/tag/helpers/tag_item_rest.php b/modules/tag/helpers/tag_item_rest.php
index cd9bb6fe..60d37437 100644
--- a/modules/tag/helpers/tag_item_rest.php
+++ b/modules/tag/helpers/tag_item_rest.php
@@ -35,8 +35,8 @@ class tag_item_rest_Core {
static function resolve($tuple) {
list ($tag_id, $item_id) = split(",", $tuple);
- $tag = ORM::factory("tag")->where("id", "=", $tag_id)->find();
- $item = ORM::factory("item")->where("id", "=", $item_id)->find();
+ $tag = ORM::factory("tag", $tag_id);
+ $item = ORM::factory("item", $item_id);
if (!$tag->loaded() || !$item->loaded() || !$tag->has($item)) {
throw new Kohana_404_Exception();
}
diff --git a/modules/tag/helpers/tag_items_rest.php b/modules/tag/helpers/tag_items_rest.php
index 369a8d83..ef563ac6 100644
--- a/modules/tag/helpers/tag_items_rest.php
+++ b/modules/tag/helpers/tag_items_rest.php
@@ -52,7 +52,7 @@ class tag_items_rest_Core {
}
static function resolve($id) {
- return ORM::factory("tag")->where("id", "=", $id)->find();
+ return ORM::factory("tag", $id);
}
static function url($tag) {
diff --git a/modules/tag/helpers/tag_rest.php b/modules/tag/helpers/tag_rest.php
index 7143daa9..4879cf63 100644
--- a/modules/tag/helpers/tag_rest.php
+++ b/modules/tag/helpers/tag_rest.php
@@ -77,7 +77,7 @@ class tag_rest_Core {
}
static function resolve($id) {
- $tag = ORM::factory("tag")->where("id", "=", $id)->find();
+ $tag = ORM::factory("tag", $id);
if (!$tag->loaded()) {
throw new Kohana_404_Exception();
}