mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/11103] Full url function
PHPBB3-11103
This commit is contained in:
parent
16a0757f2a
commit
6983f380c5
3 changed files with 19 additions and 6 deletions
|
@ -23,6 +23,10 @@ if (!defined('IN_PHPBB'))
|
||||||
*/
|
*/
|
||||||
class phpbb_notifications_method_email extends phpbb_notifications_method_base
|
class phpbb_notifications_method_email extends phpbb_notifications_method_base
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Is this method available for the user?
|
||||||
|
* This is checked on the notifications options
|
||||||
|
*/
|
||||||
public static function is_available()
|
public static function is_available()
|
||||||
{
|
{
|
||||||
// Email is always available
|
// Email is always available
|
||||||
|
@ -77,12 +81,9 @@ class phpbb_notifications_method_email extends phpbb_notifications_method_base
|
||||||
$messenger->to($user['user_email'], $user['username']);
|
$messenger->to($user['user_email'], $user['username']);
|
||||||
|
|
||||||
$messenger->assign_vars(array(
|
$messenger->assign_vars(array(
|
||||||
'SUBJECT' => htmlspecialchars_decode($notification->get_title()),
|
'SUBJECT' => htmlspecialchars_decode($notification->get_title()),
|
||||||
'AUTHOR_NAME' => '',
|
|
||||||
'USERNAME' => htmlspecialchars_decode($user['username']),
|
|
||||||
|
|
||||||
'U_INBOX' => $board_url . "/ucp.{$this->php_ext}?i=pm&folder=inbox",
|
'U_VIEW_MESSAGE' => $notification->get_full_url(),
|
||||||
'U_VIEW_MESSAGE' => $board_url . "/ucp.{$this->php_ext}?i=pm&mode=view&p={$notification->item_id}",
|
|
||||||
));
|
));
|
||||||
|
|
||||||
$messenger->send('email');
|
$messenger->send('email');
|
||||||
|
|
|
@ -29,6 +29,8 @@ interface phpbb_notifications_type_interface
|
||||||
|
|
||||||
public function get_url();
|
public function get_url();
|
||||||
|
|
||||||
|
public function get_full_url();
|
||||||
|
|
||||||
public function create_insert_array($type_data);
|
public function create_insert_array($type_data);
|
||||||
|
|
||||||
public static function find_users_for_notification(ContainerBuilder $phpbb_container, $type_data);
|
public static function find_users_for_notification(ContainerBuilder $phpbb_container, $type_data);
|
||||||
|
|
|
@ -65,7 +65,17 @@ class phpbb_notifications_type_pm extends phpbb_notifications_type_base
|
||||||
*/
|
*/
|
||||||
public function get_url()
|
public function get_url()
|
||||||
{
|
{
|
||||||
return append_sid($this->phpbb_root_path . 'ucp.' . $this->php_ext, "i=pm&mode=view&p={$this->item_id}");
|
return append_sid($this->phpbb_root_path . 'ucp.' . $this->php_ext, "i=pm&mode=view&p={$this->item_id}");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the full url to this item
|
||||||
|
*
|
||||||
|
* @return string URL
|
||||||
|
*/
|
||||||
|
public function get_full_url()
|
||||||
|
{
|
||||||
|
return generate_board_url() . "/ucp.{$this->php_ext}?i=pm&mode=view&p={$this->item_id}";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue