mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Merge branch '3.3.x'
This commit is contained in:
commit
0482df490e
1 changed files with 18 additions and 23 deletions
|
@ -333,36 +333,31 @@ class manager
|
||||||
foreach ($this->get_subscription_methods_instances() as $method)
|
foreach ($this->get_subscription_methods_instances() as $method)
|
||||||
{
|
{
|
||||||
$notified_users = $method->get_notified_users($notification_type_id, array('item_id' => $item_id));
|
$notified_users = $method->get_notified_users($notification_type_id, array('item_id' => $item_id));
|
||||||
$notification_method_name = $method->get_type();
|
|
||||||
|
|
||||||
foreach ($notified_users as $user => $notifications)
|
foreach ($notified_users as $user => $notifications)
|
||||||
{
|
{
|
||||||
unset($notify_users[$user]);
|
unset($notify_users[$user]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Allow filtering the $notify_users array by $notification_type_name & $notification_method_name for a notification that is about to be sent.
|
|
||||||
* Here, $notify_users is already filtered from users who've already been notified.
|
|
||||||
*
|
|
||||||
* @event core.notification_manager_add_notifications_for_users_modify_data
|
|
||||||
* @var string notification_type_name The notification type identifier
|
|
||||||
* @var string notification_method_name The notification method identifier (read only)
|
|
||||||
* @var array data Data specific for this type that will be inserted
|
|
||||||
* @var array notify_users User list to notify
|
|
||||||
* @var array notified_users The list of the users already notified (read only)
|
|
||||||
*
|
|
||||||
* @since 3.2.10-RC1
|
|
||||||
*/
|
|
||||||
$vars = [
|
|
||||||
'notification_type_name',
|
|
||||||
'notification_method_name',
|
|
||||||
'data',
|
|
||||||
'notify_users',
|
|
||||||
'notified_users',
|
|
||||||
];
|
|
||||||
extract($this->phpbb_dispatcher->trigger_event('core.notification_manager_add_notifications_for_users_modify_data', compact($vars)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Allow filtering the $notify_users array by $notification_type_name for a notification that is about to be sent.
|
||||||
|
* Here, $notify_users is already filtered from users who've already been notified.
|
||||||
|
*
|
||||||
|
* @event core.notification_manager_add_notifications_for_users_modify_data
|
||||||
|
* @var string notification_type_name The notification type identifier
|
||||||
|
* @var array data Data specific for this type that will be inserted
|
||||||
|
* @var array notify_users User list to notify
|
||||||
|
*
|
||||||
|
* @since 3.2.10-RC1
|
||||||
|
*/
|
||||||
|
$vars = [
|
||||||
|
'notification_type_name',
|
||||||
|
'data',
|
||||||
|
'notify_users',
|
||||||
|
];
|
||||||
|
extract($this->phpbb_dispatcher->trigger_event('core.notification_manager_add_notifications_for_users_modify_data', compact($vars)));
|
||||||
|
|
||||||
if (!count($notify_users))
|
if (!count($notify_users))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue