phpBB

Code Changes

File: phpbb/notification/type/report_post_closed.php

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

	*
* @var string
*/

	public $email_template = '';

	public $email_template = 'report_closed';


/**
* Language key used to output the text


/**
* Language key used to output the text

Line 43Line 43
	* @var string
*/
protected $language_key = 'NOTIFICATION_REPORT_CLOSED';

	* @var string
*/
protected $language_key = 'NOTIFICATION_REPORT_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_post_closed',
'lang' => 'NOTIFICATION_TYPE_REPORT_CLOSED',
'group' => 'NOTIFICATION_GROUP_MISCELLANEOUS',
];


/**
* Inherit notification read status from post.


/**
* Inherit notification read status from post.

Line 53Line 65

public function is_available()
{


public function is_available()
{

		return false;

		return $this->auth->acl_getf_global('f_report');

	}

/**

	}

/**

Line 64Line 76
	*
* @return array
*/

	*
* @return array
*/

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

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

	{

	{

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


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

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

			return array();

			return [];

		}


		}


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

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

	}

/**

	}

/**

Line 81Line 97
	*/
public function get_email_template()
{

	*/
public function get_email_template()
{

		return false;

		return $this->email_template;

	}

/**

	}

/**

Line 91Line 107
	*/
public function get_email_template_variables()
{

	*/
public function get_email_template_variables()
{

		return array();











		$post_username = $this->get_data('post_username') ?: $this->user_loader->get_username($this->get_data('poster_id'), 'username');
$closer_username = $this->user_loader->get_username($this->get_data('closer_id'), 'username');

return [
'AUTHOR_NAME' => html_entity_decode($post_username, ENT_COMPAT),
'CLOSER_NAME' => html_entity_decode($closer_username, ENT_COMPAT),
'POST_SUBJECT' => html_entity_decode(censor_text($this->get_data('post_subject')), ENT_COMPAT),
'TOPIC_TITLE' => html_entity_decode(censor_text($this->get_data('topic_title')), ENT_COMPAT),

'U_VIEW_POST' => generate_board_url() . "/viewtopic.{$this->php_ext}?p={$this->item_id}#p{$this->item_id}",
];

	}

/**

	}

/**

Line 101Line 127
	*/
public function get_url()
{

	*/
public function get_url()
{

		return '';









		return append_sid($this->phpbb_root_path . 'viewtopic.' . $this->php_ext, "p={$this->item_id}#p{$this->item_id}");
}

/**
* {inheritDoc}
*/
public function get_redirect_url()
{
return $this->get_url();

	}

/**

	}

/**

Line 147Line 181
	*/
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($post, $pre_create_data = array())

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

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


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