Browse Source

! In a little remembered fact, & has a lower precedence than == does. Which makes this rather fun otherwise.

Signed-off-by: Peter Spicer <sleeping@myperch.org>
Peter Spicer 11 years ago
parent
commit
94a9864a65

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

@@ -56,10 +56,10 @@ class GroupReq_Notify_Background extends SMF_BackgroundTask
 
 				if (!empty($prefs[$mod]))
 				{
-					if ($prefs[$mod] & 0x01 == 0x01)
+					if ($prefs[$mod] & 0x01)
 						$data['alert'][] = $mod;
 
-					if ($prefs[$mod] & 0x02 == 0x02)
+					if ($prefs[$mod] & 0x02)
 						$data['email'][] = $mod;
 				}
 			}

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

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

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

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