diff options
author | Maat <maat-pub@mageia.biz> | 2020-05-08 21:52:11 +0200 |
---|---|---|
committer | Maat <maat-pub@mageia.biz> | 2020-05-08 21:52:11 +0200 |
commit | 8ea437e30605e0f66b5220bf904a61d7c1d11ddd (patch) | |
tree | e0db2bb4a012d5b06a633160b19f62f4868ecd28 /phpBB/phpbb/notification/type/report_pm_closed.php | |
parent | 36bc1870f21fac04736a1049c1d5b8e127d729f4 (diff) | |
parent | 2fdd46b36431ae0f58bb2e78e42553168db9a0ff (diff) | |
download | forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.tar forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.tar.gz forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.tar.bz2 forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.tar.xz forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.zip |
Merge remote-tracking branch 'upstream/prep-release-3.2.9'
Diffstat (limited to 'phpBB/phpbb/notification/type/report_pm_closed.php')
-rw-r--r-- | phpBB/phpbb/notification/type/report_pm_closed.php | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/phpBB/phpbb/notification/type/report_pm_closed.php b/phpBB/phpbb/notification/type/report_pm_closed.php index 1c99db60c3..5e98eb5feb 100644 --- a/phpBB/phpbb/notification/type/report_pm_closed.php +++ b/phpBB/phpbb/notification/type/report_pm_closed.php @@ -64,7 +64,7 @@ class report_pm_closed extends \phpbb\notification\type\pm return array(); } - return array($pm['reporter'] => array('')); + return array($pm['reporter'] => $this->notification_manager->get_default_methods()); } /** @@ -106,7 +106,7 @@ class report_pm_closed extends \phpbb\notification\type\pm { $username = $this->user_loader->get_username($this->get_data('closer_id'), 'no_profile'); - return $this->user->lang( + return $this->language->lang( $this->language_key, $username ); @@ -119,7 +119,7 @@ class report_pm_closed extends \phpbb\notification\type\pm */ public function get_reference() { - return $this->user->lang( + return $this->language->lang( 'NOTIFICATION_REFERENCE', censor_text($this->get_data('message_subject')) ); @@ -144,21 +144,24 @@ class report_pm_closed extends \phpbb\notification\type\pm } /** - * Function for preparing the data for insertion in an SQL query - * (The service handles insertion) - * - * @param array $pm PM Data - * @param array $pre_create_data Data from pre_create_insert_array() - * - * @return array Array of data ready to be inserted into the database + * {@inheritdoc} */ public function create_insert_array($pm, $pre_create_data = array()) { $this->set_data('closer_id', $pm['closer_id']); - $data = parent::create_insert_array($pm, $pre_create_data); + parent::create_insert_array($pm, $pre_create_data); + + $this->notification_time = time(); + } - $this->notification_time = $data['notification_time'] = time(); + /** + * {@inheritdoc} + */ + public function get_insert_array() + { + $data = parent::get_insert_array(); + $data['notification_time'] = $this->notification_time; return $data; } |