diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-15 14:37:57 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-16 08:53:31 -0700 |
commit | 00eacd659f27df9c13246c510057c4f42c8866a2 (patch) | |
tree | 7f6201c54c0d7c1de2eeb337b3331d1864d30fb0 /modules/notification/helpers | |
parent | be6765336eb894535d62055fab577dfc951b6b6a (diff) |
Start simplifying the interface by moving the static methods from user.php and group.php. Tried creating a identity helper, but the helper identity.php was confused with the library Identity.php. So got around this by making the methods on Identity static and calling the instance within the static methods. Also temporarily moved the user.php and group.php back into the user module.
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 150616ab..4c58bc29 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 = user::active(); + $user = Identity::active(); } return ORM::factory("subscription") @@ -31,7 +31,7 @@ class notification { static function is_watching($item, $user=null) { if (empty($user)) { - $user = user::active(); + $user = Identity::active(); } 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 = user::active(); + $user = Identity::active(); } $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 = user::active(); + $user = Identity::active(); } $subscription = ORM::factory("subscription") @@ -79,7 +79,7 @@ class notification { $subscriber_ids[] = $subscriber->user_id; } - $users = user::get_user_list(array("in" => array("id", $subscriber_ids), + $users = Identity::get_user_list(array("in" => array("id", $subscriber_ids), "where" => array("email IS NOT" => null))); $subscribers = array(); diff --git a/modules/notification/helpers/notification_event.php b/modules/notification/helpers/notification_event.php index 06c5bc44..d519bdc4 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 (!user::active()->guest) { + if (!Identity::active()->guest) { $item = $theme->item(); if ($item && $item->is_album() && access::can("view", $item)) { |