Reset per-user notify types for each user

The code was passing the notifyTypes in the hook for each user, but
the second user would get passed whatever made it through the first
user.

It is unlikely this is intended.  Give each user a fresh set of the
configured notify types.

Change-Id: I13059d380ea54c71cd1c062fd803897f5e5ad2b8
This commit is contained in:
Erik Bernhardson 2014-08-01 20:16:18 -07:00 committed by EBernhardson
parent 8d5421c9cb
commit 768d0fc513

View file

@ -94,9 +94,10 @@ class EchoNotificationController {
foreach ( $users as $user ) {
wfRunHooks( 'EchoGetNotificationTypes', array( $user, $event, &$notifyTypes ) );
$userNotifyTypes = $notifyTypes;
wfRunHooks( 'EchoGetNotificationTypes', array( $user, $event, &$userNotifyTypes ) );
foreach ( $notifyTypes as $type ) {
foreach ( $userNotifyTypes as $type ) {
self::doNotification( $event, $user, $type );
}
}