diff --git a/templates/themes/catalog/theme.php b/templates/themes/catalog/theme.php index 35281649..32cc1818 100644 --- a/templates/themes/catalog/theme.php +++ b/templates/themes/catalog/theme.php @@ -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); } } diff --git a/templates/themes/overboards/overboards.php b/templates/themes/overboards/overboards.php index 637def65..39202ade 100644 --- a/templates/themes/overboards/overboards.php +++ b/templates/themes/overboards/overboards.php @@ -2,7 +2,7 @@ /* * When adding a new board, rebuild this theme. If necessary, reconfigure the catalog theme. - * Exclude list is space-separated (e.g. 'exclude' => 'b games music' ) + * Exclude list is a PHP array e.g. 'exclude' => array('b', 'games', 'music') */ $thread_limit = 30; @@ -12,14 +12,14 @@ 'title' => 'Overboard', 'uri' => 'overboard', 'subtitle' => '30 most recently bumped threads', - 'exclude' => '', + 'exclude' => array(), 'thread_limit' => $thread_limit, ), array( 'title' => 'SFW Overboard', 'uri' => 'sfwoverboard', 'subtitle' => '30 most recently bumped threads from work-safe boards', - 'exclude' => 'b', + 'exclude' => array('b'), 'thread_limit' => $thread_limit, ), ); diff --git a/templates/themes/overboards/theme.php b/templates/themes/overboards/theme.php index 59a8c963..90f6b4e3 100644 --- a/templates/themes/overboards/theme.php +++ b/templates/themes/overboards/theme.php @@ -39,8 +39,8 @@ */ class overboards { private $settings; -//TODO review if appropriate uses of pass by ref (&$) - function __construct(&$settings) { + + function __construct($settings) { $this->settings = $this->parseSettings($settings); } @@ -54,7 +54,6 @@ error('Invalid configuration parameters.', true); } - $overboard['exclude'] = explode(' ', $overboard['exclude']); $overboard['thread_limit'] = intval($overboard['thread_limit']); if ($overboard['thread_limit'] < 1) @@ -230,3 +229,4 @@ } } +