forked from leftypol/leftypol
Define excluded boards as array to simplify code
This commit is contained in:
parent
8938989efb
commit
7cc76fa0ad
3 changed files with 8 additions and 10 deletions
|
@ -34,8 +34,7 @@
|
|||
}
|
||||
if(isset($settings['has_overboard']) && $settings['has_overboard']) {
|
||||
foreach ($overboards_config as &$overboard) {
|
||||
$exclusions = explode(' ', $overboard['exclude']);
|
||||
$included_boards = array_diff(listBoards(true), $exclusions);
|
||||
$included_boards = array_diff(listBoards(true), $overboard['exclude']);
|
||||
$action = generation_strategy("sb_catalog", array($overboard));
|
||||
if ($action == 'delete') {
|
||||
file_unlink($config['dir']['home'] . $overboard . '/catalog.html');
|
||||
|
@ -61,8 +60,7 @@
|
|||
if(isset($settings['has_overboard']) && $settings['has_overboard']) {
|
||||
foreach ($overboards_config as &$overboard) {
|
||||
if ($overboard['uri'] == $board) {
|
||||
$exclusions = explode(' ', $overboard['exclude']);
|
||||
$included_boards = array_diff(listBoards(true), $exclusions);
|
||||
$included_boards = array_diff(listBoards(true), $overboard['exclude']);
|
||||
$b->buildOverboardCatalog($board, $settings, $included_boards);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue