[ticket/11103] Add topic ID to view post URL

PHPBB3-11103
This commit is contained in:
Nathan Guse 2012-09-12 21:05:11 -05:00
parent 12e46e48c8
commit 9b1de1e487
2 changed files with 6 additions and 3 deletions

View file

@ -143,7 +143,7 @@ class phpbb_notifications_type_post extends phpbb_notifications_type_base
*/
public function get_url()
{
return append_sid($this->phpbb_root_path . 'viewtopic.' . $this->php_ext, "p={$this->item_id}#p{$this->item_id}");
return append_sid($this->phpbb_root_path . 'viewtopic.' . $this->php_ext, "t={$this->get_data('topic_id')}&p={$this->item_id}#p{$this->item_id}");
}
/**
@ -153,7 +153,7 @@ class phpbb_notifications_type_post extends phpbb_notifications_type_base
*/
public function get_full_url()
{
return generate_board_url() . "/viewtopic.{$this->php_ext}?p={$this->item_id}#p{$this->item_id}";
return generate_board_url() . "/viewtopic.{$this->php_ext}?t={$this->get_data('topic_id')}&p={$this->item_id}#p{$this->item_id}";
}
/**
@ -178,6 +178,8 @@ class phpbb_notifications_type_post extends phpbb_notifications_type_base
{
$this->item_id = $post['post_id'];
$this->set_data('topic_id', $post['topic_id']);
$this->set_data('poster_id', $post['poster_id']);
$this->set_data('topic_title', $post['topic_title']);

View file

@ -385,7 +385,8 @@ $lang = array_merge($lang, array(
'NOT_AUTHORISED' => 'You are not authorised to access this area.',
'NOT_WATCHING_FORUM' => 'You are no longer subscribed to updates on this forum.',
'NOT_WATCHING_TOPIC' => 'You are no longer subscribed to this topic.',
'NOTIFICATION_PM' => '%1$s sent you a Private Message titled: %2$s.',
'NOTIFICATIONS' => '[ Notifications ]',
'NOTIFICATION_PM' => '%1$s sent you a Private Message "%2$s".',
'NOTIFICATION_POST' => '%1$s replied to the topic "%2$s".',
'NOTIFICATION_TOPIC' => '%1$s posted a new topic "%2$s" in the forum "%3$s".',
'NOTIFY_ADMIN' => 'Please notify the board administrator or webmaster.',