forked from leftypol/leftypol
Merged lainchan with vichan master at 25/9/2016 0bd63149b7
@czaks czaks committed on GitHub 2 days ago
This commit is contained in:
commit
c58e37ce39
114 changed files with 5580 additions and 898 deletions
|
@ -15,23 +15,30 @@
|
|||
// - post-thread (a thread has been made)
|
||||
if ($action === 'all') {
|
||||
foreach ($boards as $board) {
|
||||
if ($config['smart_build']) {
|
||||
$b = new Catalog();
|
||||
|
||||
$action = generation_strategy("sb_catalog", array($board));
|
||||
if ($action == 'delete') {
|
||||
file_unlink($config['dir']['home'] . $board . '/catalog.html');
|
||||
} else {
|
||||
$b->build($board);
|
||||
file_unlink($config['dir']['home'] . $board . '/index.rss');
|
||||
}
|
||||
elseif ($action == 'rebuild') {
|
||||
$b->build($settings, $board);
|
||||
}
|
||||
}
|
||||
} elseif (in_array($board, $boards) &&
|
||||
$action == 'post-thread' ||
|
||||
($settings['update_on_posts'] && $action == 'post') ||
|
||||
($settings['update_on_posts'] && $action == 'post-delete'))
|
||||
{
|
||||
if ($config['smart_build']) {
|
||||
} elseif ($action == 'post-thread' || ($settings['update_on_posts'] && $action == 'post') || ($settings['update_on_posts'] && $action == 'post-delete') && in_array($board, $boards)) {
|
||||
$b = new Catalog();
|
||||
|
||||
$action = generation_strategy("sb_catalog", array($board));
|
||||
if ($action == 'delete') {
|
||||
file_unlink($config['dir']['home'] . $board . '/catalog.html');
|
||||
} else {
|
||||
$b->build($board);
|
||||
file_unlink($config['dir']['home'] . $board . '/index.rss');
|
||||
}
|
||||
}
|
||||
elseif ($action == 'rebuild') {
|
||||
$b->build($settings, $board);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// FIXME: Check that Ukko is actually enabled
|
||||
if ($settings['enable_ukko'] && (
|
||||
|
@ -210,10 +217,13 @@
|
|||
$post['file'] = $config['uri_thumb'] . $files[0]->thumb;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$post['file'] = $config['root'] . $config['image_deleted'];
|
||||
}
|
||||
|
||||
if (empty($post['image_count']))
|
||||
$post['image_count'] = 0;
|
||||
$post['pubdate'] = date('r', $post['time']);
|
||||
|
||||
$posts[] = $post;
|
||||
}
|
||||
|
@ -247,5 +257,11 @@
|
|||
'board' => $board_name,
|
||||
'link' => $board_link
|
||||
)));
|
||||
|
||||
file_write($config['dir']['home'] . $board_name . '/index.rss', Element('themes/catalog/index.rss', Array(
|
||||
'config' => $config,
|
||||
'recent_posts' => $recent_posts,
|
||||
'board' => $board
|
||||
)));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue