|
13 | 13 |
|
14 | 14 | namespace phpbb\message;
|
15 | 15 |
|
| 16 | +use phpbb\messenger\method\messenger_interface; |
| 17 | + |
16 | 18 | /**
|
17 | 19 | * Class message
|
18 | 20 | * Holds all information for an email and sends it in the end
|
@@ -46,7 +48,7 @@ class message
|
46 | 48 | /** @var string */
|
47 | 49 | protected $sender_jabber = '';
|
48 | 50 | /** @var int */
|
49 |
| - protected $sender_notify_type = NOTIFY_EMAIL; |
| 51 | + protected $sender_notify_type = messenger_interface::NOTIFY_EMAIL; |
50 | 52 |
|
51 | 53 | /** @var array */
|
52 | 54 | protected $recipients;
|
@@ -134,7 +136,7 @@ public function add_recipient_from_user_row(array $user)
|
134 | 136 | * @param string $recipient_jabber
|
135 | 137 | * @return void
|
136 | 138 | */
|
137 |
| - public function add_recipient($recipient_name, $recipient_address, $recipient_lang, $recipient_notify_type = NOTIFY_EMAIL, $recipient_username = '', $recipient_jabber = '') |
| 139 | + public function add_recipient($recipient_name, $recipient_address, $recipient_lang, $recipient_notify_type = messenger_interface::NOTIFY_EMAIL, $recipient_username = '', $recipient_jabber = '') |
138 | 140 | {
|
139 | 141 | $this->recipients[] = array(
|
140 | 142 | 'name' => $recipient_name,
|
@@ -250,7 +252,7 @@ public function send(\phpbb\di\service_collection $messenger, $contact)
|
250 | 252 | foreach ($messenger_collection_iterator as $messenger_method)
|
251 | 253 | {
|
252 | 254 | $messenger_method->set_use_queue(false);
|
253 |
| - if ($messenger_method->get_id() == $recipient['notify_type'] || $recipient['notify_type'] == NOTIFY_BOTH) |
| 255 | + if ($messenger_method->get_id() == $recipient['notify_type'] || $recipient['notify_type'] == $messenger_method::NOTIFY_BOTH) |
254 | 256 | {
|
255 | 257 | $messenger_method->template($this->template, $recipient['lang']);
|
256 | 258 | $messenger_method->set_addresses($recipient);
|
|
0 commit comments