Merge branch '3.2.x'

This commit is contained in:
Marc Alexander 2016-03-30 21:04:14 +02:00
commit be5175d451

View file

@ -115,14 +115,14 @@ class quote extends \phpbb\notification\type\post
)); ));
// Find the new users to notify // Find the new users to notify
$notifications = array_keys($this->find_users_for_notification($post)); $notifications = $this->find_users_for_notification($post);
// Find the notifications we must delete // Find the notifications we must delete
$remove_notifications = array_diff(array_keys($old_notifications), array_keys($notifications)); $remove_notifications = array_diff(array_keys($old_notifications), array_keys($notifications));
// Find the notifications we must add // Find the notifications we must add
$add_notifications = array(); $add_notifications = array();
foreach (array_diff(array_keys($notifications), $old_notifications) as $user_id) foreach (array_diff(array_keys($notifications), array_keys($old_notifications)) as $user_id)
{ {
$add_notifications[$user_id] = $notifications[$user_id]; $add_notifications[$user_id] = $notifications[$user_id];
} }