Browse Source

undefined variable

main
ghost 12 months ago
parent
commit
bff1962071
  1. 5
      src/Controller/SearchController.php

5
src/Controller/SearchController.php

@ -24,6 +24,7 @@ class SearchController extends AbstractController
// Defaults // Defaults
$locales = []; $locales = [];
$categories = []; $categories = [];
$sensitive = [];
// Request // Request
$query = $request->get('query') ? urldecode($request->get('query')) : ''; $query = $request->get('query') ? urldecode($request->get('query')) : '';
@ -65,7 +66,7 @@ class SearchController extends AbstractController
$keywords, $keywords,
[$locale], [$locale],
$request->get('categories') ? $request->get('categories') : $user->getCategories(), $request->get('categories') ? $request->get('categories') : $user->getCategories(),
$sensitive, $request->get('sensitive') ? null : false,
!$user->isModerator() ? true : null, !$user->isModerator() ? true : null,
!$user->isModerator() ? true : null, !$user->isModerator() ? true : null,
) )
@ -94,7 +95,7 @@ class SearchController extends AbstractController
$keywords, $keywords,
$request->get('locales') ? $request->get('locales') : $user->getLocales(), $request->get('locales') ? $request->get('locales') : $user->getLocales(),
[$category], [$category],
$sensitive, $request->get('sensitive') ? null : false,
!$user->isModerator() ? true : null, !$user->isModerator() ? true : null,
!$user->isModerator() ? true : null, !$user->isModerator() ? true : null,
) )

Loading…
Cancel
Save