summaryrefslogtreecommitdiff
path: root/modules/tag/models
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-11-26 12:09:04 -0800
committerBharat Mediratta <bharat@menalto.com>2009-11-26 12:09:04 -0800
commit1fd0e14359a7c7164573e4aa897c07680339e713 (patch)
tree62b01b88571e53810aa7f3efc2f0f01e727904e2 /modules/tag/models
parent22823df22098ed1a69d88c2e5fdc30cd90f72c30 (diff)
Convert all DB where() calls to take 3 arguments.
Convert all open_paren() calls to and_open() or or_open() as appropriate.
Diffstat (limited to 'modules/tag/models')
-rw-r--r--modules/tag/models/tag.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/tag/models/tag.php b/modules/tag/models/tag.php
index be020f5f..f9a453be 100644
--- a/modules/tag/models/tag.php
+++ b/modules/tag/models/tag.php
@@ -31,9 +31,9 @@ class Tag_Model extends ORM {
$model = ORM::factory("item")
->viewable()
->join("items_tags", "items.id", "items_tags.item_id")
- ->where("items_tags.tag_id", $this->id);
+ ->where("items_tags.tag_id", "=", $this->id);
if ($type) {
- $model->where("items.type", $type);
+ $model->where("items.type", "=", $type);
}
return $model->find_all($limit, $offset);
}
@@ -47,10 +47,10 @@ class Tag_Model extends ORM {
$model = ORM::factory("item")
->viewable()
->join("items_tags", "items.id", "items_tags.item_id")
- ->where("items_tags.tag_id", $this->id);
+ ->where("items_tags.tag_id", "=", $this->id);
if ($type) {
- $model->where("items.type", $type);
+ $model->where("items.type", "=", $type);
}
return $model->count_all();
}