summaryrefslogtreecommitdiff
path: root/modules/comment/helpers
diff options
context:
space:
mode:
authorChad Kieffer <ckieffer@gmail.com>2009-11-01 11:25:08 -0700
committerChad Kieffer <ckieffer@gmail.com>2009-11-01 11:25:08 -0700
commit1202db1c3a67ff8232254989ece76e707b21d730 (patch)
tree2d55b73ec9bbd9d1f5dbc7d9e8972d9b05285a25 /modules/comment/helpers
parent7ae4b35d787bf51ac98baf1c1818f580e0195016 (diff)
parent91c5a9abb7b617e45b547ced6a28c14a64ef760f (diff)
Merge branch 'master' of github.com:gallery/gallery3
Diffstat (limited to 'modules/comment/helpers')
-rw-r--r--modules/comment/helpers/comment_event.php27
1 files changed, 14 insertions, 13 deletions
diff --git a/modules/comment/helpers/comment_event.php b/modules/comment/helpers/comment_event.php
index ddf72e3c..a72102b9 100644
--- a/modules/comment/helpers/comment_event.php
+++ b/modules/comment/helpers/comment_event.php
@@ -24,23 +24,24 @@ class comment_event_Core {
static function user_deleted($user) {
$guest = identity::guest();
- Database::instance()
- ->query("UPDATE {comments}
- SET author_id = {$guest->id},
- guest_email = NULL,
- guest_name = 'guest',
- guest_url = NULL
- WHERE author_id = {$user->id}");
+ Database::instance()->from("comments")
+ ->set(array("author_id" => $guest->id,
+ "guest_email" => null,
+ "guest_name" => "guest",
+ "guest_url" => null))
+ ->where(array("author_id" => $user->id))
+ ->update();
}
static function identity_provider_changed($old_provider, $new_provider) {
$guest = identity::guest();
- Database::instance()
- ->query("UPDATE {comments}
- SET author_id = {$guest->id},
- guest_email = NULL,
- guest_name = 'guest',
- guest_url = null");
+ Database::instance()->from("comments")
+ ->set(array("author_id" => $guest->id,
+ "guest_email" => null,
+ "guest_name" => "guest",
+ "guest_url" => null))
+ ->where("1 = 1")
+ ->update();
}
static function admin_menu($menu, $theme) {