forked from leftypol/leftypol
context.php: handle the search.flag_filter configuration option
This commit is contained in:
parent
d695ff2582
commit
8028c1bd9a
1 changed files with 8 additions and 6 deletions
|
|
@ -72,12 +72,14 @@ function build_context(array $config): Context {
|
||||||
},
|
},
|
||||||
SearchService::class => function($c) {
|
SearchService::class => function($c) {
|
||||||
$config = $c->get('config');
|
$config = $c->get('config');
|
||||||
if ($config['user_flag']) {
|
|
||||||
$flags = $config['user_flags'];
|
$flags = null;
|
||||||
} elseif ($config['country_flags']) {
|
if ($config['search']['flag_filter']) {
|
||||||
$flags = Flags::EMBEDDED_FLAGS;
|
if ($config['user_flag']) {
|
||||||
} else {
|
$flags = $config['user_flags'];
|
||||||
$flags = null;
|
} elseif ($config['country_flags']) {
|
||||||
|
$flags = Flags::EMBEDDED_FLAGS;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$board_uris = $config['search']['boards'] ?? null;
|
$board_uris = $config['search']['boards'] ?? null;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue