phpBB

Code Changes

File: phpbb/notification/type/report_post.php

  Unmodified   Added   Modified   Removed
Line 66Line 66
	* @var bool|array False if the service should use it's default data
* Array of data (including keys 'id' and 'lang')
*/

	* @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',

		'id'	=> 'notification.type.report',
'lang' => 'NOTIFICATION_TYPE_REPORT',
'group' => 'NOTIFICATION_GROUP_MODERATION',

Line 139Line 139
	*/
public function get_title()
{

	*/
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');



$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
);

			$this->language_key,
$username
);

Line 156Line 156
	*/
public function get_reference()
{

	*/
public function get_reference()
{

		return $this->user->lang(

		return $this->language->lang(

			'NOTIFICATION_REFERENCE',
censor_text($this->get_data('post_subject'))
);

			'NOTIFICATION_REFERENCE',
censor_text($this->get_data('post_subject'))
);

Line 171Line 171
	{
if ($this->get_data('report_text'))
{

	{
if ($this->get_data('report_text'))
{

			return $this->user->lang(

			return $this->language->lang(

				'NOTIFICATION_REASON',
$this->get_data('report_text')
);
}


				'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',

				'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')
);

			'NOTIFICATION_REASON',
$this->get_data('reason_description')
);

Line 196Line 196
	*/
public function get_avatar()
{

	*/
public function get_avatar()
{

		return $this->user_loader->get_avatar($this->get_data('reporter_id'));

		return $this->user_loader->get_avatar($this->get_data('reporter_id'), false, true);

	}

/**

	}

/**

Line 210Line 210
	}

/**

	}

/**

	* 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())
{

	*/
public function create_insert_array($post, $pre_create_data = array())
{

Line 225Line 219
		$this->set_data('reason_description', $post['reason_description']);
$this->set_data('report_text', $post['report_text']);


		$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);

	}
}


	}
}