1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[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']);