phpBB

Code Changes

File: phpbb/notification/type/pm.php

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

	* @var bool|array False if the service should use it's default data
* Array of data (including keys 'id', 'lang', and 'group')
*/

	public static $notification_option = array(

	static public $notification_option = array(

		'lang'	=> 'NOTIFICATION_TYPE_PM',
);

		'lang'	=> 'NOTIFICATION_TYPE_PM',
);

 

/** @var \phpbb\user_loader */
protected $user_loader;

/** @var \phpbb\config\config */
protected $config;

public function set_config(\phpbb\config\config $config)
{
$this->config = $config;
}

public function set_user_loader(\phpbb\user_loader $user_loader)
{
$this->user_loader = $user_loader;
}


/**
* Is available


/**
* Is available

Line 53Line 69
	*
* @param array $pm The data from the private message
*/

	*
* @param array $pm The data from the private message
*/

	public static function get_item_id($pm)

	static public function get_item_id($pm)

	{
return (int) $pm['msg_id'];
}

	{
return (int) $pm['msg_id'];
}

Line 63Line 79
	*
* @param array $pm The data from the pm
*/

	*
* @param array $pm The data from the pm
*/

	public static function get_item_parent_id($pm)

	static public function get_item_parent_id($pm)

	{
// No parent
return 0;

	{
// No parent
return 0;

Line 100Line 116
	*/
public function get_avatar()
{

	*/
public function get_avatar()
{

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

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

	}

/**

	}

/**

Line 112Line 128
	{
$username = $this->user_loader->get_username($this->get_data('from_user_id'), 'no_profile');


	{
$username = $this->user_loader->get_username($this->get_data('from_user_id'), 'no_profile');


		return $this->user->lang('NOTIFICATION_PM', $username);

		return $this->language->lang('NOTIFICATION_PM', $username);

	}

/**

	}

/**

Line 122Line 138
	*/
public function get_reference()
{

	*/
public function get_reference()
{

		return $this->user->lang(

		return $this->language->lang(

			'NOTIFICATION_REFERENCE',
$this->get_data('message_subject')
);

			'NOTIFICATION_REFERENCE',
$this->get_data('message_subject')
);

Line 176Line 192
	}

/**

	}

/**

	* Function for preparing the data for insertion in an SQL query
* (The service handles insertion)
*
* @param array $pm 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($pm, $pre_create_data = array())
{

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

Line 190Line 200

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



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


		return parent::create_insert_array($pm, $pre_create_data);

		parent::create_insert_array($pm, $pre_create_data);

	}
}


	}
}