summaryrefslogtreecommitdiff
path: root/modules/notification/helpers
diff options
context:
space:
mode:
authorNathan Kinkade <nkinkade@nkinka.de>2010-01-26 16:33:02 +0000
committerNathan Kinkade <nkinkade@nkinka.de>2010-01-26 16:33:02 +0000
commita6f794c20dc3592bcaef17c622413c1b670a20d8 (patch)
tree8819f4d9108b4b98fc1d59a3fb23d28cdfba9555 /modules/notification/helpers
parentb21e7be11a0abe57790ec2a2fcca1874632fed8c (diff)
parentaccd00464e2d7e1d1fd0e24e1ee583a7baa73611 (diff)
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/notification/helpers')
-rw-r--r--modules/notification/helpers/notification_event.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/modules/notification/helpers/notification_event.php b/modules/notification/helpers/notification_event.php
index edbf6e39..c8628ae4 100644
--- a/modules/notification/helpers/notification_event.php
+++ b/modules/notification/helpers/notification_event.php
@@ -126,4 +126,25 @@ class notification_event_Core {
}
}
}
+
+ static function show_user_profile($data) {
+ if ($data->display_all) {
+ $view = new View("user_profile_notification.html");
+ $view->subscriptions = array();
+ foreach(ORM::factory("subscription")
+ ->where("user_id", "=", $data->user->id)
+ ->find_all() as $subscription) {
+ $item = ORM::factory("item")
+ ->where("id", "=", $subscription->item_id)
+ ->find();
+ if ($item->loaded()) {
+ $view->subscriptions[] = (object)array("id" => $subscription->id, "title" => $item->title,
+ "url" => $item->url());
+ }
+ }
+ if (count($view->subscriptions) > 0) {
+ $data->content[] = (object)array("title" => t("Watching"), "view" => $view);
+ }
+ }
+ }
} \ No newline at end of file