forked from GithubBackups/tinyib
Fix reply order on index pages
This commit is contained in:
parent
90da48c558
commit
cb16ad0bd4
@ -281,13 +281,13 @@ function rebuildIndexes() {
|
|||||||
$replies = postsInThreadByID($thread['id']);
|
$replies = postsInThreadByID($thread['id']);
|
||||||
$thread['omitted'] = max(0, count($replies) - TINYIB_PREVIEWREPLIES - 1);
|
$thread['omitted'] = max(0, count($replies) - TINYIB_PREVIEWREPLIES - 1);
|
||||||
|
|
||||||
$htmlposts .= buildPost($thread, TINYIB_INDEXPAGE);
|
// Build replies for preview
|
||||||
|
$htmlreplies = array();
|
||||||
for ($j = count($replies) - 1; $j > $thread['omitted']; $j--) {
|
for ($j = count($replies) - 1; $j > $thread['omitted']; $j--) {
|
||||||
$htmlposts .= buildPost($replies[$j], TINYIB_INDEXPAGE);
|
$htmlreplies[] = buildPost($replies[$j], TINYIB_INDEXPAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
$htmlposts .= "<br clear=\"left\">\n<hr>";
|
$htmlposts .= buildPost($thread, TINYIB_INDEXPAGE) . implode('', array_reverse($htmlreplies)) . "<br clear=\"left\">\n<hr>";
|
||||||
|
|
||||||
if (++$i >= TINYIB_THREADSPERPAGE) {
|
if (++$i >= TINYIB_THREADSPERPAGE) {
|
||||||
$file = ($page == 0) ? 'index.html' : $page . '.html';
|
$file = ($page == 0) ? 'index.html' : $page . '.html';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user