diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-22 13:09:20 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-22 13:11:03 -0700 |
commit | 3c936d661a088fb43b47eb5b208958180e8f65eb (patch) | |
tree | 1a117dc1bfe54bec44f664cbd7c5f8c93aa5e993 /modules/notification/helpers | |
parent | 4cb9ec1d6d37b49ebafc68d0a94d794a1acb8b28 (diff) |
Change the name of identity library from Identity to IdentityProvider. Create a helper class called identity to simplify call the Identity Provider. Move the contents of MY_Session.php to the new helper class and remove the MY_Session class
Diffstat (limited to 'modules/notification/helpers')
-rw-r--r-- | modules/notification/helpers/notification.php | 10 | ||||
-rw-r--r-- | modules/notification/helpers/notification_event.php | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/modules/notification/helpers/notification.php b/modules/notification/helpers/notification.php index 080f154b..9a40b0b9 100644 --- a/modules/notification/helpers/notification.php +++ b/modules/notification/helpers/notification.php @@ -20,7 +20,7 @@ class notification { static function get_subscription($item_id, $user=null) { if (empty($user)) { - $user = Session::active_user(); + $user = identity::active_user(); } return ORM::factory("subscription") @@ -31,7 +31,7 @@ class notification { static function is_watching($item, $user=null) { if (empty($user)) { - $user = Session::active_user(); + $user = identity::active_user(); } return ORM::factory("subscription") @@ -44,7 +44,7 @@ class notification { static function add_watch($item, $user=null) { if ($item->is_album()) { if (empty($user)) { - $user = Session::active_user(); + $user = identity::active_user(); } $subscription = ORM::factory("subscription"); $subscription->item_id = $item->id; @@ -56,7 +56,7 @@ class notification { static function remove_watch($item, $user=null) { if ($item->is_album()) { if (empty($user)) { - $user = Session::active_user(); + $user = identity::active_user(); } $subscription = ORM::factory("subscription") @@ -81,7 +81,7 @@ class notification { if (empty($subscriber_ids)) { return array(); } - $users = Identity::get_user_list($subscriber_ids); + $users = identity::get_user_list($subscriber_ids); $subscribers = array(); foreach ($users as $user) { diff --git a/modules/notification/helpers/notification_event.php b/modules/notification/helpers/notification_event.php index f0530cd9..3a369155 100644 --- a/modules/notification/helpers/notification_event.php +++ b/modules/notification/helpers/notification_event.php @@ -95,7 +95,7 @@ class notification_event_Core { } static function site_menu($menu, $theme) { - if (!Session::active_user()->guest) { + if (!identity::active_user()->guest) { $item = $theme->item(); if ($item && $item->is_album() && access::can("view", $item)) { |