diff options
author | James Atkinson <thefinn@users.sourceforge.net> | 2001-11-09 09:12:01 +0000 |
---|---|---|
committer | James Atkinson <thefinn@users.sourceforge.net> | 2001-11-09 09:12:01 +0000 |
commit | db0b2fc30f3777f79967efa8cfcb2c3b3b1e42aa (patch) | |
tree | b0429224b9ff8457cb63fa9b14bb6876dc29d42a /phpBB/viewtopic.php | |
parent | 833f085eb2f6f957045f2bce4874c61de9a93ebb (diff) | |
download | forums-db0b2fc30f3777f79967efa8cfcb2c3b3b1e42aa.tar forums-db0b2fc30f3777f79967efa8cfcb2c3b3b1e42aa.tar.gz forums-db0b2fc30f3777f79967efa8cfcb2c3b3b1e42aa.tar.bz2 forums-db0b2fc30f3777f79967efa8cfcb2c3b3b1e42aa.tar.xz forums-db0b2fc30f3777f79967efa8cfcb2c3b3b1e42aa.zip |
Fixed bug #478505 also added code to retain highlight though pagination on viewtopic
git-svn-id: file:///svn/phpbb/trunk@1290 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r-- | phpBB/viewtopic.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 9ae84c6eb7..0460f7021c 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -496,7 +496,7 @@ if( isset($HTTP_GET_VARS['highlight']) ) // // Split words and phrases // - $words = explode(" ", $HTTP_GET_VARS['highlight']); + $words = explode(" ", trim(urldecode($HTTP_GET_VARS['highlight']))); for($i = 0; $i < count($words); $i++) { @@ -1033,8 +1033,20 @@ else $s_watching_topic = ""; } +// +// If we've got a hightlight set pass it on to pagination, I get annoyed when I lose my highlight after the first page. +// +if(isset($HTTP_GET_VARS['highlight'])) +{ + $pagination = generate_pagination("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&postdays=$post_days&postorder=$post_order&highlight=" . $HTTP_GET_VARS['highlight'], $total_replies, $board_config['posts_per_page'], $start); +} +else +{ + $pagination = generate_pagination("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&postdays=$post_days&postorder=$post_order", $total_replies, $board_config['posts_per_page'], $start); +} + $template->assign_vars(array( - "PAGINATION" => generate_pagination("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&postdays=$post_days&postorder=$post_order", $total_replies, $board_config['posts_per_page'], $start), + "PAGINATION" => $pagination, "PAGE_NUMBER" => sprintf($lang['Page_of'], ( floor( $start / $board_config['posts_per_page'] ) + 1 ), ceil( $total_replies / $board_config['posts_per_page'] )), "S_AUTH_LIST" => $s_auth_can, |