Browse Source

! If a user reports a post, don't then immediately send them a notification that a post was reported, because that's just a bit silly.

Signed-off-by: Peter Spicer <sleeping@myperch.org>
Peter Spicer 11 years ago
parent
commit
7912c3e6b4
1 changed files with 3 additions and 0 deletions
  1. 3 0
      Sources/tasks/MsgReport-Notify.php

+ 3 - 0
Sources/tasks/MsgReport-Notify.php

@@ -58,6 +58,9 @@ class MsgReport_Notify_Background extends SMF_BackgroundTask
 		// And now weed out the duplicates.
 		$members = array_flip(array_flip($members));
 
+		// And don't send it to them if they're the one who reported it.
+		$members = array_diff($members, array($this->_details['sender_id']));
+
 		// Having successfully figured this out, now let's get the preferences of everyone.
 		require_once($sourcedir . '/Subs-Notify.php');
 		$prefs = getNotifyPrefs($members, 'msg_report', true);