summaryrefslogtreecommitdiff
path: root/modules/notification/helpers/notification_event.php
diff options
context:
space:
mode:
authorAndy Staudacher <andy.st@gmail.com>2009-11-15 19:44:47 -0800
committerAndy Staudacher <andy.st@gmail.com>2009-11-15 19:44:47 -0800
commit0733dc37fda27a5ba35f9020edf3c66aa41a95a0 (patch)
tree6877946232f1b01b1c8709054c689f6658cef34f /modules/notification/helpers/notification_event.php
parent218493c50be9362d4abed6900a816308fee5d978 (diff)
parent9379308f91a476f790fb8d444536719535c584e4 (diff)
Merge commit 'upstream/master'
Conflicts: modules/gallery/tests/xss_data.txt
Diffstat (limited to 'modules/notification/helpers/notification_event.php')
-rw-r--r--modules/notification/helpers/notification_event.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/modules/notification/helpers/notification_event.php b/modules/notification/helpers/notification_event.php
index c50b04c4..6b2df574 100644
--- a/modules/notification/helpers/notification_event.php
+++ b/modules/notification/helpers/notification_event.php
@@ -52,6 +52,17 @@ class notification_event_Core {
}
}
+ static function user_deleted($user) {
+ ORM::factory("subscriptions")
+ ->where(array("user_id", $user->id))
+ ->delete_all();
+ }
+
+ static function identity_provider_changed($old_provider, $new_provider) {
+ ORM::factory("subscriptions")
+ ->delete_all();
+ }
+
static function comment_created($comment) {
try {
if ($comment->state == "published") {
@@ -95,7 +106,7 @@ class notification_event_Core {
}
static function site_menu($menu, $theme) {
- if (!user::active()->guest) {
+ if (!identity::active_user()->guest) {
$item = $theme->item();
if ($item && $item->is_album() && access::can("view", $item)) {
@@ -107,7 +118,7 @@ class notification_event_Core {
->append(Menu::factory("link")
->id("watch")
->label($label)
- ->css_id("gNotifyLink")
+ ->css_id("g-notify-link")
->url(url::site("notification/watch/$item->id?csrf=" . access::csrf_token())));
}
}