aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/notifications/method/email.php11
-rw-r--r--phpBB/includes/notifications/type/interface.php2
-rw-r--r--phpBB/includes/notifications/type/pm.php12
3 files changed, 19 insertions, 6 deletions
diff --git a/phpBB/includes/notifications/method/email.php b/phpBB/includes/notifications/method/email.php
index 0120485cff..b1979296b9 100644
--- a/phpBB/includes/notifications/method/email.php
+++ b/phpBB/includes/notifications/method/email.php
@@ -23,6 +23,10 @@ if (!defined('IN_PHPBB'))
*/
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()
{
// 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->assign_vars(array(
- 'SUBJECT' => htmlspecialchars_decode($notification->get_title()),
- 'AUTHOR_NAME' => '',
- 'USERNAME' => htmlspecialchars_decode($user['username']),
+ 'SUBJECT' => htmlspecialchars_decode($notification->get_title()),
- 'U_INBOX' => $board_url . "/ucp.{$this->php_ext}?i=pm&folder=inbox",
- 'U_VIEW_MESSAGE' => $board_url . "/ucp.{$this->php_ext}?i=pm&mode=view&p={$notification->item_id}",
+ 'U_VIEW_MESSAGE' => $notification->get_full_url(),
));
$messenger->send('email');
diff --git a/phpBB/includes/notifications/type/interface.php b/phpBB/includes/notifications/type/interface.php
index ccd963ba06..03e24358a9 100644
--- a/phpBB/includes/notifications/type/interface.php
+++ b/phpBB/includes/notifications/type/interface.php
@@ -29,6 +29,8 @@ interface phpbb_notifications_type_interface
public function get_url();
+ public function get_full_url();
+
public function create_insert_array($type_data);
public static function find_users_for_notification(ContainerBuilder $phpbb_container, $type_data);
diff --git a/phpBB/includes/notifications/type/pm.php b/phpBB/includes/notifications/type/pm.php
index 2b2a835470..50c67de21a 100644
--- a/phpBB/includes/notifications/type/pm.php
+++ b/phpBB/includes/notifications/type/pm.php
@@ -65,7 +65,17 @@ class phpbb_notifications_type_pm extends phpbb_notifications_type_base
*/
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}";
}
/**