mirror of
https://code.rocketnine.space/tslocum/tinyib.git
synced 2025-01-18 00:28:16 +01:00
Fix reply order on index pages
This commit is contained in:
parent
90da48c558
commit
cb16ad0bd4
12
inc/html.php
12
inc/html.php
@ -280,14 +280,14 @@ function rebuildIndexes() {
|
||||
foreach ($threads as $thread) {
|
||||
$replies = postsInThreadByID($thread['id']);
|
||||
$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--) {
|
||||
$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) {
|
||||
$file = ($page == 0) ? 'index.html' : $page . '.html';
|
||||
|
Loading…
x
Reference in New Issue
Block a user