diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-12-06 20:38:57 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-12-06 20:38:57 -0800 |
commit | 3d0a7a33ad0c1bbc16ef6156609110e14b6e0ee6 (patch) | |
tree | 94d0a256394cc77d08a2196517769d3d95a9b754 /modules | |
parent | 2132c9a96d923d48effc3fe8facedff4a4da3b13 (diff) |
Fix a few more database queries
Diffstat (limited to 'modules')
-rw-r--r-- | modules/tag/controllers/tags.php | 2 | ||||
-rw-r--r-- | modules/tag/models/tag.php | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/modules/tag/controllers/tags.php b/modules/tag/controllers/tags.php index dfa3a9b3..a44f6aa3 100644 --- a/modules/tag/controllers/tags.php +++ b/modules/tag/controllers/tags.php @@ -83,7 +83,7 @@ class Tags_Controller extends Controller { $limit = $this->input->get("limit"); $tag_part = end($tag_parts); $tag_list = ORM::factory("tag") - ->like("name", "{$tag_part}%", false) + ->where("name", "LIKE", "{$tag_part}%") ->order_by("name", "ASC") ->limit($limit) ->find_all(); diff --git a/modules/tag/models/tag.php b/modules/tag/models/tag.php index b60f8dfc..f6cc6144 100644 --- a/modules/tag/models/tag.php +++ b/modules/tag/models/tag.php @@ -82,7 +82,9 @@ class Tag_Model extends ORM { } if ($related_item_ids) { - foreach (ORM::factory("item")->in("id", array_keys($related_item_ids))->find_all() as $item) { + foreach (ORM::factory("item") + ->where("id", "IN", array_keys($related_item_ids)) + ->find_all() as $item) { module::event("item_related_update", $item); } } |