mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-11 19:24:01 +02:00
[ticket/17489] Fix queue for ucp_resend, add type hints to $messenger_method
PHPBB-17489
This commit is contained in:
@@ -133,6 +133,8 @@ class ucp_activate
|
||||
|
||||
$messenger = $phpbb_container->get('messenger.method_collection');
|
||||
$messenger_collection_iterator = $messenger->getIterator();
|
||||
|
||||
/** @var \phpbb\messenger\method\base $messenger_method */
|
||||
foreach ($messenger_collection_iterator as $messenger_method)
|
||||
{
|
||||
if ($messenger_method->get_id() == $user_row['user_notify_type'] || $user_row['user_notify_type'] == $messenger_method::NOTIFY_BOTH)
|
||||
|
@@ -138,6 +138,7 @@ class ucp_resend
|
||||
$messenger_collection_iterator = $messenger->getIterator();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
/** @var \phpbb\messenger\method\base $messenger_method */
|
||||
foreach ($messenger_collection_iterator as $messenger_method)
|
||||
{
|
||||
$messenger_method->set_use_queue(false);
|
||||
@@ -153,16 +154,13 @@ class ucp_resend
|
||||
]);
|
||||
|
||||
$messenger_method->send();
|
||||
|
||||
// Save the queue in the messenger method class (has to be called or these messages could be lost)
|
||||
$messenger_method->save_queue();
|
||||
}
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Save the queue in the messenger method class (has to be called or these messages could be lost)
|
||||
foreach ($messenger_collection_iterator as $messenger_method)
|
||||
{
|
||||
$messenger_method->save_queue();
|
||||
}
|
||||
}
|
||||
|
||||
$this->update_activation_expiration();
|
||||
|
Reference in New Issue
Block a user