Skip to content

Instantly share code, notes, and snippets.

@arturo-c
Created August 9, 2012 14:17
Show Gist options
  • Save arturo-c/3304562 to your computer and use it in GitHub Desktop.
Save arturo-c/3304562 to your computer and use it in GitHub Desktop.
diff --git a/www/sites/all/modules/contrib/og/modules/og_notifications/og_notifications.module b/www/sites/all/modules/contrib/og/modules/og_notifications/og_notifications.module
index e99b22b..6df4842 100644
--- a/www/sites/all/modules/contrib/og/modules/og_notifications/og_notifications.module
+++ b/www/sites/all/modules/contrib/og/modules/og_notifications/og_notifications.module
@@ -174,9 +174,11 @@ function og_notifications_og($op, $gid, $uid, $args) {
case 'admin create':
case 'admin new':
case 'user broadcast':
- $destinations = is_array($uid) ? $uid : array($uid);
- foreach ($destinations as $uid) {
- notifications_lite_send($uid, $args['subject'], $args['body']);
+ if (empty($args['notifications_disable'])) {
+ $destinations = is_array($uid) ? $uid : array($uid);
+ foreach ($destinations as $uid) {
+ notifications_lite_send($uid, $args['subject'], $args['body']);
+ }
}
break;
}
diff --git a/www/sites/all/modules/contrib/og/og.module b/www/sites/all/modules/contrib/og/og.module
index 98e16fd..7253c60 100644
--- a/www/sites/all/modules/contrib/og/og.module
+++ b/www/sites/all/modules/contrib/og/og.module
@@ -1634,6 +1634,10 @@ function og_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
'body' => _og_mail_text('og_new_admin_body', $variables)
);
+ if (!empty($node->notifications_content_disable)) {
+ $message['notifications_disable'] = TRUE;
+ }
+
// Skip the alert if we are auto-generating nodes.
if (empty($node->devel_generate)) {
// Alert the user that they are now the admin of the group.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment