Skip to content

Commit

Permalink
[ticket/16959] Remove redundant URL parameters from notification mails
Browse files Browse the repository at this point in the history
Some phpBB forum notification emails send URLs to the forum with redundant URL
parameters, notably a forum IDs with topic URLs.

To have shorter and cleaner URLs, those are hereby removed.

Signed-off-by: MichaIng <[email protected]>

PHPBB3-16959
  • Loading branch information
MichaIng committed Mar 4, 2022
1 parent cc60a63 commit 86e009a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions phpBB/phpbb/notification/type/forum.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ public function get_email_template_variables()
'TOPIC_TITLE' => htmlspecialchars_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}",
'U_NEWEST_POST' => generate_board_url() . "/viewtopic.{$this->php_ext}?f={$this->get_data('forum_id')}&t={$this->item_parent_id}&e=1&view=unread#unread",
'U_TOPIC' => generate_board_url() . "/viewtopic.{$this->php_ext}?f={$this->get_data('forum_id')}&t={$this->item_parent_id}",
'U_VIEW_TOPIC' => generate_board_url() . "/viewtopic.{$this->php_ext}?f={$this->get_data('forum_id')}&t={$this->item_parent_id}",
'U_NEWEST_POST' => generate_board_url() . "/viewtopic.{$this->php_ext}?t={$this->item_parent_id}&e=1&view=unread#unread",
'U_TOPIC' => generate_board_url() . "/viewtopic.{$this->php_ext}?t={$this->item_parent_id}",
'U_VIEW_TOPIC' => generate_board_url() . "/viewtopic.{$this->php_ext}?t={$this->item_parent_id}",
'U_FORUM' => generate_board_url() . "/viewforum.{$this->php_ext}?f={$this->get_data('forum_id')}",
'U_STOP_WATCHING_FORUM' => generate_board_url() . "/viewtopic.{$this->php_ext}?uid={$this->user_id}&f={$this->get_data('forum_id')}&t={$this->item_parent_id}&unwatch=forum",
'U_STOP_WATCHING_FORUM' => generate_board_url() . "/viewforum.{$this->php_ext}?uid={$this->user_id}&f={$this->get_data('forum_id')}&unwatch=forum",
];
}
}

0 comments on commit 86e009a

Please sign in to comment.