From 402134632f0d60e9644d0121c2a84db4a4c1a169 Mon Sep 17 00:00:00 2001
From: cash
+ | ||||||||||||||
$foo) { - if ($i > 0) + if ($i > 0) { echo " | "; + } ?> | - | - | + guid,'',9999,0)) { - foreach($friends as $friend) - $members[] = $friend->guid; + $members = array(); + if ($friends = get_user_friends($vars['user']->guid, '', 9999, 0)) { + foreach($friends as $friend) { + $members[] = $friend->guid; } - $memberno = sizeof($members); - $members = implode(',',$members); + } + $memberno = sizeof($members); + $members = implode(',',$members); ?> - | ||||||||||
- - () - - |
+ ||||||||||||||
+ + () + + |
$foo) {
- $metaname = 'collections_notifications_preferences_' . $method;
- if ($collections_preferences = $vars['user']->$metaname) {
- if (!empty($collections_preferences) && !is_array($collections_preferences))
- $collections_preferences = array($collections_preferences);
- if (is_array($collections_preferences))
+ $fields = '';
+ $i = 0;
+ foreach($NOTIFICATION_HANDLERS as $method => $foo) {
+ $metaname = 'collections_notifications_preferences_' . $method;
+ if ($collections_preferences = $vars['user']->$metaname) {
+ if (!empty($collections_preferences) && !is_array($collections_preferences)) {
+ $collections_preferences = array($collections_preferences);
+ }
+ if (is_array($collections_preferences)) {
if (in_array(-1,$collections_preferences)) {
$collectionschecked[$method] = 'checked="checked"';
} else {
$collectionschecked[$method] = '';
}
}
- if ($i > 0) $fields .= ""; - $fields .= <<< END - | - - | -END; - $i++; } - echo $fields; + if ($i > 0) { + $fields .= ""; + } + $fields .= <<< END + | + + | +END; + $i++; + } + echo $fields; ?> -- | + guid)) { - foreach($collections as $collection) { - $members = get_members_of_access_collection($collection->id, true); - $memberno = sizeof($members); - $members = implode(',',$members); + foreach($collections as $collection) { + $members = get_members_of_access_collection($collection->id, true); + $memberno = sizeof($members); + $members = implode(',', $members); ?> - | ||||||||
- - name; ?> () - - - |
-
+ ||||||||||||||
+ + name; ?> () + + |
+
$foo) {
- $metaname = 'collections_notifications_preferences_' . $method;
- if ($collections_preferences = $vars['user']->$metaname) {
- if (!empty($collections_preferences) && !is_array($collections_preferences))
- $collections_preferences = array($collections_preferences);
- if (is_array($collections_preferences))
- if (in_array($collection->id,$collections_preferences)) {
- $collectionschecked[$method] = 'checked="checked"';
- } else {
- $collectionschecked[$method] = '';
+ $fields = '';
+ $i = 0;
+ foreach($NOTIFICATION_HANDLERS as $method => $foo) {
+ $metaname = 'collections_notifications_preferences_' . $method;
+ if ($collections_preferences = $vars['user']->$metaname) {
+ if (!empty($collections_preferences) && !is_array($collections_preferences)) {
+ $collections_preferences = array($collections_preferences);
+ }
+ if (is_array($collections_preferences)) {
+ if (in_array($collection->id,$collections_preferences)) {
+ $collectionschecked[$method] = 'checked="checked"';
+ } else {
+ $collectionschecked[$method] = '';
+ }
+ }
}
- }
- if ($i > 0) $fields .= ""; - $fields .= <<< END - | - - | + if ($i > 0) { + $fields .= ""; + } + $fields .= <<< END + | + + | END; - $i++; - } - echo $fields; + $i++; + } + echo $fields; ?> - -- | + diff --git a/mod/notifications/views/default/notifications/subscriptions/form.php b/mod/notifications/views/default/notifications/subscriptions/form.php index 8ad0110bf..d4f243e20 100644 --- a/mod/notifications/views/default/notifications/subscriptions/form.php +++ b/mod/notifications/views/default/notifications/subscriptions/form.php @@ -1,33 +1,34 @@ |
+ |
$foo) { - if ($i > 0) + if ($i > 0) { echo " | "; + } ?> - | + | - | - | "; - $fields .= <<< END - | - - | ++ + $foo) { + if (in_array($group->guid,$subsbig[$method])) { + $checked[$method] = 'checked="checked"'; + } else { + $checked[$method] = ''; + } + if ($i > 0) { + $fields .= " | "; + } + $fields .= <<< END + | + + | END; - $i++; - } - + $i++; + } + ?> -
- - name; ?> - - |
+ ||||
+ + name; ?> + + |
- - | + - |
+ | |||||
$foo) { - if ($i > 0) - echo " | "; +$i = 0; +foreach($NOTIFICATION_HANDLERS as $method => $foo) { + if ($i > 0) { + echo " | "; + } ?> - | + | - | - |
- - - - - |
-
+ + | ||||
+ + + + |
+
$foo) {
- if ($notification_settings = get_user_notification_settings($vars['user']->guid)) {
- if ($notification_settings->$method) {
- $personalchecked[$method] = 'checked="checked"';
- } else {
- $personalchecked[$method] = '';
- }
- }
- if ($i > 0) $fields .= ""; - $fields .= <<< END - | - - | -END; - $i++; +$fields = ''; +$i = 0; +foreach($NOTIFICATION_HANDLERS as $method => $foo) { + if ($notification_settings = get_user_notification_settings($vars['user']->guid)) { + if ($notification_settings->$method) { + $personalchecked[$method] = 'checked="checked"'; + } else { + $personalchecked[$method] = ''; } - echo $fields; + } + if ($i > 0) { + $fields .= ""; + } + $fields .= <<< END + | + + | +END; + $i++; +} +echo $fields; ?> - -- | + |