From db0b2fc30f3777f79967efa8cfcb2c3b3b1e42aa Mon Sep 17 00:00:00 2001 From: James Atkinson Date: Fri, 9 Nov 2001 09:12:01 +0000 Subject: [PATCH] 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 --- phpBB/viewtopic.php | 16 ++++++++++++++-- 1 file 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,