From 4ee8f9349a69fabcbd757587bc09852eeb4c096d Mon Sep 17 00:00:00 2001 From: nonmakina Date: Sun, 10 Jan 2021 21:28:16 -0600 Subject: [PATCH] Add overboard catalog to the rebuild-all action --- templates/themes/catalog/theme.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/templates/themes/catalog/theme.php b/templates/themes/catalog/theme.php index bce93d31..3c91a4ac 100644 --- a/templates/themes/catalog/theme.php +++ b/templates/themes/catalog/theme.php @@ -17,7 +17,7 @@ // - post-thread (a thread has been made) if ($action === 'all') { foreach ($boards as $board) { - $b = new Catalog($settings); + //$b = new Catalog($settings); $action = generation_strategy("sb_catalog", array($board)); if ($action == 'delete') { @@ -29,6 +29,17 @@ $b->build($settings, $board); } } + if($settings['has_overboard']) { + $board = $settings['overboard_location']; + $action = generation_strategy("sb_catalog", array($board)); + if ($action == 'delete') { + file_unlink($config['dir']['home'] . $board . '/catalog.html'); + file_unlink($config['dir']['home'] . $board . '/index.rss'); + } + elseif ($action == 'rebuild') { + $b->buildOverboardCatalog($settings, $boards); + } + } } elseif ($action == 'post-thread' || ($settings['update_on_posts'] && $action == 'post') || ($settings['update_on_posts'] && $action == 'post-delete') || $action == 'sticky' || ($action == 'lock' && in_array($board, $boards))) { $b = new Catalog($settings); @@ -339,7 +350,6 @@ * Build and save the HTML of the catalog for the overboard */ public function buildOverboardCatalog($settings, $board_names) { - global $config; $board_name = $settings['overboard_location']; if (array_key_exists($board_name, $this->threadsCache)) {