aboutsummaryrefslogtreecommitdiff
path: root/mod/notifications
diff options
context:
space:
mode:
Diffstat (limited to 'mod/notifications')
-rw-r--r--mod/notifications/languages/en.php2
-rw-r--r--mod/notifications/start.php4
-rw-r--r--mod/notifications/views/default/notifications/subscriptions/collections.php15
3 files changed, 10 insertions, 11 deletions
diff --git a/mod/notifications/languages/en.php b/mod/notifications/languages/en.php
index b29c9df25..0f2ba2304 100644
--- a/mod/notifications/languages/en.php
+++ b/mod/notifications/languages/en.php
@@ -8,7 +8,7 @@ $english = array(
'notifications:subscriptions:personal:title' => 'Personal notifications',
'notifications:subscriptions:friends:title' => 'Friends',
- 'notifications:subscriptions:friends:description' => 'The following is an automatic collection made up of your friends. To receive updates select below. This will affect the corresponding users in the main notification settings panel at the bottom of the page. ',
+ 'notifications:subscriptions:friends:description' => 'Below are collections of your friends. Selecting a collection turns on notifications for the users in that collection.',
'notifications:subscriptions:collections:edit' => 'To edit your shared access notifications, click here.',
'notifications:subscriptions:changesettings' => 'Notifications',
diff --git a/mod/notifications/start.php b/mod/notifications/start.php
index d5d418f0f..b76b0aa1e 100644
--- a/mod/notifications/start.php
+++ b/mod/notifications/start.php
@@ -25,7 +25,7 @@ function notifications_plugin_init() {
// update notifications when new friend or access collection membership
elgg_register_event_handler('create', 'friend', 'notifications_update_friend_notify');
- elgg_register_plugin_hook_handler('access:collections:add-user', 'collection', 'notifications_update_collection_notify');
+ elgg_register_plugin_hook_handler('access:collections:add_user', 'collection', 'notifications_update_collection_notify');
$actions_base = elgg_get_plugins_path() . 'notifications/actions';
elgg_register_action("notificationsettings/save", "$actions_base/save.php");
@@ -194,7 +194,7 @@ function notifications_update_collection_notify($event, $object_type, $returnval
}
if (in_array($collection_id, $collections_preferences)) {
// notifications are on for this collection so we add/remove
- if ($event == 'access:collections:add-user') {
+ if ($event == 'access:collections:add_user') {
add_entity_relationship($user->guid, "notify$method", $member_guid);
} elseif ($event == 'access:collections:remove_user') {
// removing someone from an access collection is not a guarantee
diff --git a/mod/notifications/views/default/notifications/subscriptions/collections.php b/mod/notifications/views/default/notifications/subscriptions/collections.php
index b8787570d..8ce77c4b2 100644
--- a/mod/notifications/views/default/notifications/subscriptions/collections.php
+++ b/mod/notifications/views/default/notifications/subscriptions/collections.php
@@ -99,14 +99,14 @@ END;
<td>&nbsp;</td>
</tr>
<?php
-/*
- @todo
- collections removed from notifications - they are no longer used and will be replaced with shared access collections
-
- if ($collections = get_user_access_collections(elgg_get_logged_in_user_guid())) {
+
+ if ($collections = get_user_access_collections($user->guid)) {
foreach($collections as $collection) {
$members = get_members_of_access_collection($collection->id, true);
- $memberno = sizeof($members);
+ $memberno = 0;
+ if ($members) {
+ $memberno = sizeof($members);
+ }
$members = implode(',', $members);
?>
@@ -123,7 +123,7 @@ END;
$i = 0;
foreach($NOTIFICATION_HANDLERS as $method => $foo) {
$metaname = 'collections_notifications_preferences_' . $method;
- if ($collections_preferences = elgg_get_logged_in_user_entity()->$metaname) {
+ if ($collections_preferences = $user->$metaname) {
if (!empty($collections_preferences) && !is_array($collections_preferences)) {
$collections_preferences = array($collections_preferences);
}
@@ -156,7 +156,6 @@ END;
}
}
-*/
?>
</table>
</div>