Wedge
Public area => Bug reports => The Pub => Archived fixes => Topic started by: CerealGuy on August 3rd, 2014, 10:06 PM
-
It looks like the search ignores the "Search in specific boards" option. It always searchs in all boards.
-
Did some research on this one.
The problem is, that a $_REQUEST['search_type'] is needed to activate the action. Otherwise $_REQUEST['brd] gets unset.
// Did the user provide a scope preference?
if (isset($_REQUEST['search_type']))
{
// Topic: do nothing, board: erase any topic IDs, everywhere: erase any options.
if ($_REQUEST['search_type'] == 'board')
unset($_REQUEST['topic']);
elseif ($_REQUEST['search_type'] == 'tree' && !empty($_REQUEST['brd']))
{
unset($_REQUEST['topic']);
loadSource('Subs-Boards');
$_REQUEST['brd'] = getBoardChildren($_REQUEST['brd']);
}
elseif ($_REQUEST['search_type'] == 'everywhere')
unset($_REQUEST['topic'], $_REQUEST['brd']);
}
else
unset($_REQUEST['topic'], $_REQUEST['brd']);
A small and hacky fix:
Add this
if(isset($_REQUEST['brd']) and !isset($_REQUEST['search_type'])){
$_REQUEST['search_type'] = 'board';
}
before
// Did the user provide a scope preference? .
A better fix would be to just set search_type in form to board.
-
A better fix:
https://github.com/C3realGuy/wedge/commit/72026d680b16ae7e1380c84b5a06969ea7d04873