summaryrefslogtreecommitdiff
path: root/modules/comment/helpers
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/comment/helpers
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/comment/helpers')
-rw-r--r--modules/comment/helpers/comment_event.php6
-rw-r--r--modules/comment/helpers/comment_rss.php4
-rw-r--r--modules/comment/helpers/comment_theme.php4
3 files changed, 7 insertions, 7 deletions
diff --git a/modules/comment/helpers/comment_event.php b/modules/comment/helpers/comment_event.php
index a72102b9..cf5d0a60 100644
--- a/modules/comment/helpers/comment_event.php
+++ b/modules/comment/helpers/comment_event.php
@@ -29,7 +29,7 @@ class comment_event_Core {
"guest_email" => null,
"guest_name" => "guest",
"guest_url" => null))
- ->where(array("author_id" => $user->id))
+ ->where("author_id", "=", $user->id)
->update();
}
@@ -40,7 +40,7 @@ class comment_event_Core {
"guest_email" => null,
"guest_name" => "guest",
"guest_url" => null))
- ->where("1 = 1")
+ ->where("1", "=", "1") // @todo: why do we do this?
->update();
}
@@ -65,7 +65,7 @@ class comment_event_Core {
foreach (Database::instance()
->select("text")
->from("comments")
- ->where("item_id", $item->id)
+ ->where("item_id", "=", $item->id)
->get()
->as_array() as $row) {
$data[] = $row->text;
diff --git a/modules/comment/helpers/comment_rss.php b/modules/comment/helpers/comment_rss.php
index d0bb7859..77044884 100644
--- a/modules/comment/helpers/comment_rss.php
+++ b/modules/comment/helpers/comment_rss.php
@@ -35,11 +35,11 @@ class comment_rss_Core {
$comments = ORM::factory("comment")
->viewable()
- ->where("state", "published")
+ ->where("state", "=", "published")
->order_by("created", "DESC");
if ($feed_id == "item") {
- $comments->where("item_id", $id);
+ $comments->where("item_id", "=", $id);
}
$feed->view = "comment.mrss";
diff --git a/modules/comment/helpers/comment_theme.php b/modules/comment/helpers/comment_theme.php
index 2f12192b..ebcc1c42 100644
--- a/modules/comment/helpers/comment_theme.php
+++ b/modules/comment/helpers/comment_theme.php
@@ -37,8 +37,8 @@ class comment_theme_Core {
$view = new View("comments.html");
$view->comments = ORM::factory("comment")
- ->where("item_id", $theme->item()->id)
- ->where("state", "published")
+ ->where("item_id", "=", $theme->item()->id)
+ ->where("state", "=", "published")
->order_by("created", "ASC")
->find_all();