summaryrefslogtreecommitdiff
path: root/inc/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/functions.php')
-rw-r--r--inc/functions.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/inc/functions.php b/inc/functions.php
index 676b6554..8b0745d3 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -1132,6 +1132,9 @@ function index($page, $mod=false) {
$thread->add(new Post($po, $mod ? '?/' : $config['root'], $mod));
}
+ $thread->images = $num_images;
+ $thread->replies = isset($omitted['post_count']) ? $omitted['post_count'] : count($replies);
+
if ($omitted) {
$thread->omitted = $omitted['post_count'] - ($th['sticky'] ? $config['threads_preview_sticky'] : $config['threads_preview']);
$thread->omitted_images = $omitted['image_count'] - $num_images;
@@ -1416,6 +1419,10 @@ function buildIndex() {
$json = json_encode($api->translateCatalog($catalog));
$jsonFilename = $board['dir'] . 'catalog.json';
file_write($jsonFilename, $json);
+
+ $json = json_encode($api->translateCatalog($catalog, true));
+ $jsonFilename = $board['dir'] . 'threads.json';
+ file_write($jsonFilename, $json);
}
if ($config['try_smarter'])