phpBB

Code Changes

File: phpbb/notification/type/report_pm_closed.php

  Unmodified   Added   Modified   Removed
Line 35Line 35
	*
* @var string
*/

	*
* @var string
*/

	public $email_template = '';

	public $email_template = 'report_pm_closed';


/**
* Language key used to output the text
*
* @var string
*/


/**
* Language key used to output the text
*
* @var string
*/

	protected $language_key = 'NOTIFICATION_REPORT_CLOSED';













	protected $language_key = 'NOTIFICATION_REPORT_PM_CLOSED';

/**
* Notification option data (for outputting to the user)
*
* @var bool|array False if the service should use it's default data
* Array of data (including keys 'id', 'lang', and 'group')
*/
static public $notification_option = [
'id' => 'notification.type.report_pm_closed',
'lang' => 'NOTIFICATION_TYPE_REPORT_PM_CLOSED',
'group' => 'NOTIFICATION_GROUP_MISCELLANEOUS',
];


public function is_available()
{


public function is_available()
{

		return false;

		return (bool) $this->config['allow_pm_report'];

	}

/**

	}

/**

Line 57Line 69
	*
* @return array
*/

	*
* @return array
*/

	public function find_users_for_notification($pm, $options = array())

	public function find_users_for_notification($pm, $options = [])

	{

	{

 
		$options = array_merge([
'ignore_users' => [],
], $options);


		if ($pm['reporter'] == $this->user->data['user_id'])
{

		if ($pm['reporter'] == $this->user->data['user_id'])
{

			return array();

			return [];

		}


		}


		return array($pm['reporter'] => $this->notification_manager->get_default_methods());

		return $this->check_user_notification_options([$pm['reporter']], $options);

	}

/**

	}

/**

Line 74Line 90
	*/
public function get_email_template()
{

	*/
public function get_email_template()
{

		return false;

		return $this->email_template;

	}

/**

	}

/**

Line 84Line 100
	*/
public function get_email_template_variables()
{

	*/
public function get_email_template_variables()
{

		return array();
}

		$sender_username = $this->user_loader->get_username($this->get_data('from_user_id'), 'username');
$closer_username = $this->user_loader->get_username($this->get_data('closer_id'), 'username');





	/**
* Get the url to this item
*
* @return string URL
*/
public function get_url()
{
return '';

		return [
'AUTHOR_NAME' => html_entity_decode($sender_username, ENT_COMPAT),
'CLOSER_NAME' => html_entity_decode($closer_username, ENT_COMPAT),
'SUBJECT' => html_entity_decode(censor_text($this->get_data('message_subject')), ENT_COMPAT),

'U_VIEW_MESSAGE'=> generate_board_url() . "/ucp.{$this->php_ext}?i=pm&mode=view&p={$this->item_id}",
];


	}

/**

	}

/**

Line 140Line 155
	*/
public function users_to_query()
{

	*/
public function users_to_query()
{

		return array($this->get_data('closer_id'));

		return [$this->get_data('closer_id')];

	}

/**
* {@inheritdoc}
*/

	}

/**
* {@inheritdoc}
*/

	public function create_insert_array($pm, $pre_create_data = array())

	public function create_insert_array($pm, $pre_create_data = [])

	{
$this->set_data('closer_id', $pm['closer_id']);


	{
$this->set_data('closer_id', $pm['closer_id']);