diff options
Diffstat (limited to 'mod/notifications')
5 files changed, 15 insertions, 18 deletions
diff --git a/mod/notifications/actions/groupsave.php b/mod/notifications/actions/groupsave.php index 7838f7e63..e79dae5cc 100644 --- a/mod/notifications/actions/groupsave.php +++ b/mod/notifications/actions/groupsave.php @@ -21,8 +21,8 @@ $groups = array(); $options = array( 'relationship' => 'member', 'relationship_guid' => $user->guid, - 'types' => 'group', - 'limit' => 9999, + 'type' => 'group', + 'limit' => false, ); if ($groupmemberships = elgg_get_entities_from_relationship($options)) { foreach($groupmemberships as $groupmembership) { @@ -30,14 +30,11 @@ if ($groupmemberships = elgg_get_entities_from_relationship($options)) { } } -// Load important global vars -global $NOTIFICATION_HANDLERS; -foreach($NOTIFICATION_HANDLERS as $method => $foo) { - $subscriptions[$method] = get_input($method.'subscriptions'); - $personal[$method] = get_input($method.'personal'); - $collections[$method] = get_input($method.'collections'); - if (!empty($groups)) { - foreach($groups as $group) { +if (!empty($groups)) { + global $NOTIFICATION_HANDLERS; + foreach ($NOTIFICATION_HANDLERS as $method => $foo) { + $subscriptions[$method] = get_input($method.'subscriptions', array()); + foreach ($groups as $group) { if (in_array($group, $subscriptions[$method])) { add_entity_relationship($user->guid, 'notify'.$method, $group); } else { diff --git a/mod/notifications/groups.php b/mod/notifications/groups.php index 3347d4054..973f3493c 100644 --- a/mod/notifications/groups.php +++ b/mod/notifications/groups.php @@ -28,8 +28,8 @@ $people = array(); $groupmemberships = elgg_get_entities_from_relationship(array( 'relationship' => 'member', 'relationship_guid' => $user->guid, - 'types' => 'group', - 'limit' => 9999, + 'type' => 'group', + 'limit' => false, )); $body = elgg_view_form('notificationsettings/groupsave', array(), array( diff --git a/mod/notifications/index.php b/mod/notifications/index.php index cd1857f04..a99622efd 100644 --- a/mod/notifications/index.php +++ b/mod/notifications/index.php @@ -27,8 +27,8 @@ $people = array(); if ($people_ents = elgg_get_entities_from_relationship(array( 'relationship' => 'notify', 'relationship_guid' => $user->guid, - 'types' => 'user', - 'limit' => 99999, + 'type' => 'user', + 'limit' => false, ))) { foreach($people_ents as $ent) { diff --git a/mod/notifications/views/default/forms/notificationsettings/groupsave.php b/mod/notifications/views/default/forms/notificationsettings/groupsave.php index 168639ab2..f3e5f693a 100644 --- a/mod/notifications/views/default/forms/notificationsettings/groupsave.php +++ b/mod/notifications/views/default/forms/notificationsettings/groupsave.php @@ -15,8 +15,8 @@ foreach ($NOTIFICATION_HANDLERS as $method => $foo) { $subsbig[$method] = elgg_get_entities_from_relationship(array( 'relationship' => 'notify' . $method, 'relationship_guid' => $user->guid, - 'types' => 'group', - 'limit' => 99999, + 'type' => 'group', + 'limit' => false, )); $tmparray = array(); if ($subsbig[$method]) { diff --git a/mod/notifications/views/default/notifications/subscriptions/forminternals.php b/mod/notifications/views/default/notifications/subscriptions/forminternals.php index 11f266303..79a7959ac 100644 --- a/mod/notifications/views/default/notifications/subscriptions/forminternals.php +++ b/mod/notifications/views/default/notifications/subscriptions/forminternals.php @@ -31,8 +31,8 @@ foreach($NOTIFICATION_HANDLERS as $method => $foo) { $subsbig[$method] = elgg_get_entities_from_relationship(array( 'relationship' => 'notify' . $method, 'relationship_guid' => $user->guid, - 'types' => 'user', - 'limit' => 99999, + 'type' => 'user', + 'limit' => false, )); } |