Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/Board.php
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,6 @@ public static function getUserVisibleBoards(array $boards): array
{
// Query to fetch boards visible to the user.
$request = Db::$db->query(
'order_by_board_order',
'SELECT id_board, b.name, child_level, c.name AS cat_name, id_cat
FROM {db_prefix}boards AS b
JOIN {db_prefix}categories AS c USING (id_cat)
Expand All @@ -1131,6 +1130,7 @@ public static function getUserVisibleBoards(array $boards): array
[
'empty_string' => '',
],
identifier: 'order_by_board_order',
);

$categories = [];
Expand Down
8 changes: 4 additions & 4 deletions Themes/default/Search.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,13 @@ function template_main()
<a href="#" id="advanced_panel_link">', Lang::getTxt('choose_board', file: 'Search'), '</a>
</h4>
</div>
<div class="flow_auto boardslist" id="advanced_panel_div"', Utils::$context['boards_check_all'] ? ' style="display: none;"' : '', '>
<div class="flow_auto boardslist" id="advanced_panel_div"', !empty(Utils::$context['boards_check_all']) ? ' style="display: none;"' : '', '>
<ul>';

foreach (Utils::$context['categories'] as $category) {
echo '
<li>
<a href="javascript:void(0);" onclick="selectBoards([', implode(', ', $category['child_ids']), '], \'searchform\'); return false;">', $category['name'], '</a>
<a href="javascript:void(0);" onclick="selectBoards([', !empty($category['child_ids']) ? implode(', ', $category['child_ids']) : '', '], \'searchform\'); return false;">', $category['name'], '</a>
<ul>';

$cat_boards = array_values($category['boards']);
Expand Down Expand Up @@ -213,7 +213,7 @@ function template_main()
</div><!-- #advanced_panel_div -->
<br class="clear">
<div class="padding">
<input type="checkbox" name="all" id="check_all" value=""', Utils::$context['boards_check_all'] ? ' checked' : '', ' onclick="invertAll(this, this.form, \'brd\');">
<input type="checkbox" name="all" id="check_all" value=""', !empty(Utils::$context['boards_check_all']) ? ' checked' : '', ' onclick="invertAll(this, this.form, \'brd\');">
<label for="check_all"><em>', Lang::getTxt('check_all', file: 'General'), '</em></label>
<input type="submit" name="b_search" value="', Lang::getTxt('search', file: 'General'), '" class="button floatright">
</div>
Expand All @@ -224,7 +224,7 @@ function template_main()
<script>
var oAdvancedPanelToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', Utils::$context['boards_check_all'] ? 'true' : 'false', ',
bCurrentlyCollapsed: ', !empty(Utils::$context['boards_check_all']) ? 'true' : 'false', ',
aSwappableContainers: [
\'advanced_panel_div\'
],
Expand Down
Loading