Browse Source

Wrap overboard api threads inside a page

pull/40/head
Pietro Carrara 3 years ago
parent
commit
8e2a6ccb9d
  1. 7
      templates/themes/catalog/theme.php

7
templates/themes/catalog/theme.php

@ -468,10 +468,13 @@
$threads[] = new Thread($post); $threads[] = new Thread($post);
} }
$json = json_encode($api->translateCatalogPage($threads)); // Page 0, the only page
$threads = array($threads);
$json = json_encode($api->translateCatalog($threads));
file_write($config['dir']['home'] . $board_name . '/catalog.json', $json); file_write($config['dir']['home'] . $board_name . '/catalog.json', $json);
$json = json_encode($api->translateCatalogPage($threads, true)); $json = json_encode($api->translateCatalog($threads, true));
file_write($config['dir']['home'] . $board_name . '/threads.json', $json); file_write($config['dir']['home'] . $board_name . '/threads.json', $json);
} }
} }

Loading…
Cancel
Save