1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-19 23:11:45 +02:00

[ticket/17135] Move notify method constants to interface class

PHPBB-17135
This commit is contained in:
rxu
2025-01-06 20:01:52 +07:00
parent 28d5534d06
commit 0d8c0c4228
21 changed files with 77 additions and 50 deletions

View File

@@ -67,7 +67,7 @@ abstract class messenger_base extends \phpbb\notification\method\base
/**
* Notify using phpBB messenger
*
* @param int $notify_method Notify method for messenger (e.g. NOTIFY_IM)
* @param int $notify_method Notify method for messenger (e.g. \phpbb\messenger\method\messenger_interface::NOTIFY_IM)
* @param string $template_dir_prefix Base directory to prepend to the email template name
*
* @return void
@@ -115,7 +115,7 @@ abstract class messenger_base extends \phpbb\notification\method\base
$messenger_collection_iterator = $this->messenger->getIterator();
foreach ($messenger_collection_iterator as $messenger_method)
{
if ($messenger_method->get_id() == $notify_method || $notify_method == NOTIFY_BOTH)
if ($messenger_method->get_id() == $notify_method || $notify_method == $messenger_method::NOTIFY_BOTH)
{
$messenger_method->template($notification->get_email_template(), $user['user_lang'], '', $template_dir_prefix);
$messenger_method->set_addresses($user);