forked from leftypol/leftypol
Add overboard catalog to the rebuild-all action
This commit is contained in:
parent
73ee83c9c6
commit
03dc4db644
1 changed files with 12 additions and 2 deletions
|
@ -17,7 +17,7 @@
|
||||||
// - post-thread (a thread has been made)
|
// - post-thread (a thread has been made)
|
||||||
if ($action === 'all') {
|
if ($action === 'all') {
|
||||||
foreach ($boards as $board) {
|
foreach ($boards as $board) {
|
||||||
$b = new Catalog($settings);
|
//$b = new Catalog($settings);
|
||||||
|
|
||||||
$action = generation_strategy("sb_catalog", array($board));
|
$action = generation_strategy("sb_catalog", array($board));
|
||||||
if ($action == 'delete') {
|
if ($action == 'delete') {
|
||||||
|
@ -29,6 +29,17 @@
|
||||||
$b->build($settings, $board);
|
$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')
|
} 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))) {
|
|| $action == 'sticky' || ($action == 'lock' && in_array($board, $boards))) {
|
||||||
$b = new Catalog($settings);
|
$b = new Catalog($settings);
|
||||||
|
@ -339,7 +350,6 @@
|
||||||
* Build and save the HTML of the catalog for the overboard
|
* Build and save the HTML of the catalog for the overboard
|
||||||
*/
|
*/
|
||||||
public function buildOverboardCatalog($settings, $board_names) {
|
public function buildOverboardCatalog($settings, $board_names) {
|
||||||
global $config;
|
|
||||||
$board_name = $settings['overboard_location'];
|
$board_name = $settings['overboard_location'];
|
||||||
|
|
||||||
if (array_key_exists($board_name, $this->threadsCache)) {
|
if (array_key_exists($board_name, $this->threadsCache)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue