|
From: James A. <th...@us...> - 2001-11-09 09:12:04
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv9086
Modified Files:
viewtopic.php
Log Message:
Fixed bug #478505 also added code to retain highlight though pagination on viewtopic
Index: viewtopic.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/viewtopic.php,v
retrieving revision 1.127
retrieving revision 1.128
diff -C2 -r1.127 -r1.128
*** viewtopic.php 2001/11/09 08:57:36 1.127
--- viewtopic.php 2001/11/09 09:12:01 1.128
***************
*** 497,501 ****
// Split words and phrases
//
! $words = explode(" ", $HTTP_GET_VARS['highlight']);
for($i = 0; $i < count($words); $i++)
--- 497,501 ----
// Split words and phrases
//
! $words = explode(" ", trim(urldecode($HTTP_GET_VARS['highlight'])));
for($i = 0; $i < count($words); $i++)
***************
*** 1034,1039 ****
}
$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),
"PAGE_NUMBER" => sprintf($lang['Page_of'], ( floor( $start / $board_config['posts_per_page'] ) + 1 ), ceil( $total_replies / $board_config['posts_per_page'] )),
--- 1034,1051 ----
}
+ //
+ // 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" => $pagination,
"PAGE_NUMBER" => sprintf($lang['Page_of'], ( floor( $start / $board_config['posts_per_page'] ) + 1 ), ceil( $total_replies / $board_config['posts_per_page'] )),
|