forked from GithubBackups/vichan
allow exclusion of boards
This commit is contained in:
parent
34a3dcac24
commit
2fa3b3c93e
12
search.php
12
search.php
@ -18,6 +18,18 @@
|
|||||||
$body = Element('search_form.html', Array('boards' => $boards, 'board' => isset($_GET['board']) ? $_GET['board'] : false, 'search' => isset($_GET['search']) ? str_replace('"', '"', utf8tohtml($_GET['search'])) : false));
|
$body = Element('search_form.html', Array('boards' => $boards, 'board' => isset($_GET['board']) ? $_GET['board'] : false, 'search' => isset($_GET['search']) ? str_replace('"', '"', utf8tohtml($_GET['search'])) : false));
|
||||||
|
|
||||||
if(isset($_GET['search']) && !empty($_GET['search']) && isset($_GET['board']) && in_array($_GET['board'], $boards)) {
|
if(isset($_GET['search']) && !empty($_GET['search']) && isset($_GET['board']) && in_array($_GET['board'], $boards)) {
|
||||||
|
|
||||||
|
//Before we do any of that, is this a disallowed board? If so, don't allow people to peer into it.
|
||||||
|
if (in_array($_GET['board'], $config['search']['disallowed_boards'])) {
|
||||||
|
$body .= '<hr/><p class="unimportant" style="text-align:center">('._('Disallowed board.').')</p>';
|
||||||
|
echo Element($config['file_page_template'], Array(
|
||||||
|
'config'=>$config,
|
||||||
|
'title'=>'Search',
|
||||||
|
'body'=>$body,
|
||||||
|
));
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
$phrase = $_GET['search'];
|
$phrase = $_GET['search'];
|
||||||
$_body = '';
|
$_body = '';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user