diff --git a/templates/themes/ukko/theme.php b/templates/themes/ukko/theme.php index ee2707bf..a3f30dd4 100644 --- a/templates/themes/ukko/theme.php +++ b/templates/themes/ukko/theme.php @@ -15,6 +15,10 @@ if ($action == 'delete') { file_unlink($settings['uri'] . '/index.html'); + if ($config['api']['enabled']) { + $jsonFilename = $settings['uri'] . '/0.json'; + file_unlink($jsonFilename); + } } elseif ($action == 'rebuild') { file_write($settings['uri'] . '/index.html', $ukko->build()); @@ -48,6 +52,9 @@ $count = 0; $threads = array(); + if ($config['api']['enabled']) { + $apithreads = array(); + } while($post = $query->fetch()) { if(!isset($threads[$post['board']])) { @@ -89,6 +96,9 @@ $thread->posts = array_reverse($thread->posts); $body .= '