diff options
author | Andy Staudacher <andy.st@gmail.com> | 2009-11-15 19:44:47 -0800 |
---|---|---|
committer | Andy Staudacher <andy.st@gmail.com> | 2009-11-15 19:44:47 -0800 |
commit | 0733dc37fda27a5ba35f9020edf3c66aa41a95a0 (patch) | |
tree | 6877946232f1b01b1c8709054c689f6658cef34f /modules/comment/helpers/comment_event.php | |
parent | 218493c50be9362d4abed6900a816308fee5d978 (diff) | |
parent | 9379308f91a476f790fb8d444536719535c584e4 (diff) |
Merge commit 'upstream/master'
Conflicts:
modules/gallery/tests/xss_data.txt
Diffstat (limited to 'modules/comment/helpers/comment_event.php')
-rw-r--r-- | modules/comment/helpers/comment_event.php | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/modules/comment/helpers/comment_event.php b/modules/comment/helpers/comment_event.php index 0234aea9..a72102b9 100644 --- a/modules/comment/helpers/comment_event.php +++ b/modules/comment/helpers/comment_event.php @@ -22,6 +22,28 @@ class comment_event_Core { Database::instance()->delete("comments", array("item_id" => $item->id)); } + static function user_deleted($user) { + $guest = identity::guest(); + 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()->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) { $menu->get("content_menu") ->append(Menu::factory("link") @@ -36,7 +58,7 @@ class comment_event_Core { ->id("comments") ->label(t("View comments on this item")) ->url("#comments") - ->css_id("gCommentsLink")); + ->css_id("g-comments-link")); } static function item_index_data($item, $data) { |