diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-04-11 12:19:04 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-04-25 11:52:19 +0200 |
commit | e0fadfb4d675df71b359b5d64b614051dda4017e (patch) | |
tree | 076abf2ac7f17ea53468ee848c82760a6286cb13 /phpBB/phpbb/notification/type/post.php | |
parent | ed40846590ea3b80af35aa845dba7e05da88c223 (diff) | |
download | forums-e0fadfb4d675df71b359b5d64b614051dda4017e.tar forums-e0fadfb4d675df71b359b5d64b614051dda4017e.tar.gz forums-e0fadfb4d675df71b359b5d64b614051dda4017e.tar.bz2 forums-e0fadfb4d675df71b359b5d64b614051dda4017e.tar.xz forums-e0fadfb4d675df71b359b5d64b614051dda4017e.zip |
[ticket/12371] Allow notification types to redirect to a different url
This way we can redirect the post and bookmark notification to the first
unread post in the topic
PHPBB3-12371
Diffstat (limited to 'phpBB/phpbb/notification/type/post.php')
-rw-r--r-- | phpBB/phpbb/notification/type/post.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/phpBB/phpbb/notification/type/post.php b/phpBB/phpbb/notification/type/post.php index f973becc3b..7d4bc06879 100644 --- a/phpBB/phpbb/notification/type/post.php +++ b/phpBB/phpbb/notification/type/post.php @@ -270,6 +270,14 @@ class post extends \phpbb\notification\type\base } /** + * {inheritDoc} + */ + public function get_redirect_url() + { + return append_sid($this->phpbb_root_path . 'viewtopic.' . $this->php_ext, "t={$this->item_parent_id}&view=unread#unread"); + } + + /** * Users needed to query before this notification can be displayed * * @return array Array of user_ids |