forked from leftypol/leftypol
revise 4chan api support
This commit is contained in:
parent
62fe8571e2
commit
d6b8447233
2 changed files with 29 additions and 10 deletions
|
@ -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'])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue