mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
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
This commit is contained in:
parent
833f085eb2
commit
db0b2fc30f
1 changed files with 14 additions and 2 deletions
|
@ -496,7 +496,7 @@ if( isset($HTTP_GET_VARS['highlight']) )
|
||||||
//
|
//
|
||||||
// Split words and phrases
|
// 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++)
|
for($i = 0; $i < count($words); $i++)
|
||||||
{
|
{
|
||||||
|
@ -1033,8 +1033,20 @@ else
|
||||||
$s_watching_topic = "";
|
$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(
|
$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'] )),
|
"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,
|
"S_AUTH_LIST" => $s_auth_can,
|
||||||
|
|
Loading…
Add table
Reference in a new issue