Browse Source

! Slightly stupid logic error that meant only alerts, never emails, would ever be sent. Oops.

Signed-off-by: Peter Spicer <[email protected]>
Peter Spicer 11 years ago
parent
commit
24d0e13eff

+ 3 - 3
Sources/tasks/GroupReq-Notify.php

@@ -50,12 +50,12 @@ class GroupReq_Notify_Background extends SMF_BackgroundTask
 			// Bitwise comparisons are fun...
 			foreach ($moderators as $mod)
 			{
-				if (!empty($prefs[$mod]))
+				if (!empty($prefs[$mod]['request_group']))
 				{
-					if ($prefs[$mod] & 0x01)
+					if ($prefs[$mod]['request_group'] & 0x01)
 						$data['alert'][] = $mod;
 
-					if ($prefs[$mod] & 0x02)
+					if ($prefs[$mod]['request_group'] & 0x02)
 						$data['email'][] = $mod;
 				}
 			}

+ 1 - 1
Sources/tasks/MsgReport-Notify.php

@@ -75,7 +75,7 @@ class MsgReport_Notify_Background extends SMF_BackgroundTask
 		foreach ($prefs as $member => $pref_option)
 		{
 			foreach ($alert_bits as $type => $bitvalue)
-				if ($pref_option & $bitvalue)
+				if ($pref_option['msg_report'] & $bitvalue)
 					$notifies[$type][] = $member;
 		}
 

+ 1 - 1
Sources/tasks/Register-Notify.php

@@ -37,7 +37,7 @@ class Register_Notify_Background extends SMF_BackgroundTask
 		foreach ($prefs as $member => $pref_option)
 		{
 			foreach ($alert_bits as $type => $bitvalue)
-				if ($pref_option & $bitvalue)
+				if ($pref_option['member_register'] & $bitvalue)
 					$notifies[$type][] = $member;
 		}