diff options
Diffstat (limited to 'phpBB/phpbb/notification/type/report_post.php')
-rw-r--r-- | phpBB/phpbb/notification/type/report_post.php | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/phpBB/phpbb/notification/type/report_post.php b/phpBB/phpbb/notification/type/report_post.php index aed31e8642..84a5241417 100644 --- a/phpBB/phpbb/notification/type/report_post.php +++ b/phpBB/phpbb/notification/type/report_post.php @@ -66,7 +66,7 @@ class report_post extends \phpbb\notification\type\post_in_queue * @var bool|array False if the service should use it's default data * Array of data (including keys 'id' and 'lang') */ - public static $notification_option = array( + static public $notification_option = array( 'id' => 'notification.type.report', 'lang' => 'NOTIFICATION_TYPE_REPORT', 'group' => 'NOTIFICATION_GROUP_MODERATION', @@ -139,11 +139,11 @@ class report_post extends \phpbb\notification\type\post_in_queue */ public function get_title() { - $this->user->add_lang('mcp'); + $this->language->add_lang('mcp'); $username = $this->user_loader->get_username($this->get_data('reporter_id'), 'no_profile'); - return $this->user->lang( + return $this->language->lang( $this->language_key, $username ); @@ -156,7 +156,7 @@ class report_post extends \phpbb\notification\type\post_in_queue */ public function get_reference() { - return $this->user->lang( + return $this->language->lang( 'NOTIFICATION_REFERENCE', censor_text($this->get_data('post_subject')) ); @@ -171,21 +171,21 @@ class report_post extends \phpbb\notification\type\post_in_queue { if ($this->get_data('report_text')) { - return $this->user->lang( + return $this->language->lang( 'NOTIFICATION_REASON', $this->get_data('report_text') ); } - if (isset($this->user->lang[$this->get_data('reason_title')])) + if ($this->language->is_set($this->get_data('reason_title'))) { - return $this->user->lang( + return $this->language->lang( 'NOTIFICATION_REASON', - $this->user->lang[$this->get_data('reason_title')] + $this->language->lang($this->get_data('reason_title')) ); } - return $this->user->lang( + return $this->language->lang( 'NOTIFICATION_REASON', $this->get_data('reason_description') ); @@ -210,13 +210,7 @@ class report_post extends \phpbb\notification\type\post_in_queue } /** - * Function for preparing the data for insertion in an SQL query - * (The service handles insertion) - * - * @param array $post Data from submit_post - * @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($post, $pre_create_data = array()) { @@ -225,6 +219,6 @@ class report_post extends \phpbb\notification\type\post_in_queue $this->set_data('reason_description', $post['reason_description']); $this->set_data('report_text', $post['report_text']); - return parent::create_insert_array($post, $pre_create_data); + parent::create_insert_array($post, $pre_create_data); } } |