]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #4983 added default paramter to get_input() to avoid warning
authorCash Costello <cash.costello@gmail.com>
Sat, 19 Jan 2013 14:50:55 +0000 (09:50 -0500)
committerCash Costello <cash.costello@gmail.com>
Sat, 19 Jan 2013 14:50:55 +0000 (09:50 -0500)
mod/notifications/actions/groupsave.php

index 7838f7e63bfa461d9dde5840dc224ee50718f863..2dd2a6db3b2a6c6a4251c6d1783cc7d2ac3bbf25 100644 (file)
@@ -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 {