- web: if showing a thread in oldest-first order, default to showing the last page of posts.

This commit is contained in:
David Anderson 2012-10-18 00:17:16 -07:00 committed by Oliver Bock
parent 5cdc6f3efd
commit e54b0ae02e
2 changed files with 17 additions and 2 deletions

View File

@ -6240,3 +6240,10 @@ David 17 Oct 2012
filesys.cpp,h
samples/atiopencl/
atiopencl.cpp
David 17 Oct 2012
- web: if showing a thread in oldest-first order,
default to showing the last page of posts.
html/inc/
forum.inc

View File

@ -343,6 +343,14 @@ function show_posts(
}
}
if ($sort_style == CREATE_TIME_OLD) {
$nposts = sizeof($posts);
$page = (int)($nposts/$num_to_show);
$default_start = $page*$num_to_show;
} else {
$default_start = 0;
}
// jump to a specific post if needed
//
$jump_to_post = null;
@ -380,10 +388,10 @@ function show_posts(
if ($jump_to_post) {
$start = $ibest - ($ibest % $num_to_show);
} else {
$start = 0;
$start = $default_start;
}
} else {
$start = 0;
$start = $default_start;
}
}