forked from leftypol/leftypol
Refactor overboard catalog support to be slightly less bad
This commit is contained in:
parent
6fcd4f4779
commit
91e41aa522
1 changed files with 3 additions and 6 deletions
|
@ -768,20 +768,17 @@ function mod_view_catalog($boardName) {
|
||||||
echo $catalog->build($boardName, true);
|
echo $catalog->build($boardName, true);
|
||||||
}
|
}
|
||||||
// What follows if horrendous. I am ashamed of myself. See https://git.leftypol.org/leftypol/leftypol/issues/94
|
// What follows if horrendous. I am ashamed of myself. See https://git.leftypol.org/leftypol/leftypol/issues/94
|
||||||
elseif ($boardName === 'overboard' || $boardName === 'sfw' || $boardName === 'alt') {
|
else {
|
||||||
require "templates/themes/overboards/overboards.php";
|
require "templates/themes/overboards/overboards.php";
|
||||||
|
|
||||||
$settings = array_merge($settings, themeSettings('catalog'));
|
|
||||||
|
|
||||||
foreach ($overboards_config as &$overboard) {
|
foreach ($overboards_config as &$overboard) {
|
||||||
if ($overboard['uri'] === $boardName) {
|
if ($overboard['uri'] === $boardName) {
|
||||||
|
$settings = array_merge($settings, themeSettings('catalog'));
|
||||||
|
|
||||||
$included_boards = array_diff(listBoards(true), $overboard['exclude']);
|
$included_boards = array_diff(listBoards(true), $overboard['exclude']);
|
||||||
echo $catalog->buildOverboard($overboard['uri'], $settings, $included_boards, true);
|
echo $catalog->buildOverboard($overboard['uri'], $settings, $included_boards, true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
error("Unknown board");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue