Skip to content

Commit

Permalink
Suche in Action-Klasse geändert
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanashi committed Oct 19, 2023
1 parent f67530e commit ec7c17a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions files/lib/action/FaqSearchAction.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,18 @@ class FaqSearchAction implements RequestHandlerInterface
{
public function handle(ServerRequestInterface $request): ResponseInterface
{
if ($request->getMethod() === 'GET') {
return new HtmlResponse(WCF::getTPL()->fetch('faqQuestionSearchDialog'));
} elseif ($request->getMethod() === 'POST') {
if ($request->getMethod() === 'GET' || $request->getMethod() === 'POST') {
$postParameters = Helper::mapQueryParameters(
$request->getParsedBody(),
<<<'EOT'
array {
searchString: string
searchString?: string
}
EOT
);
if (!isset($postParameters['searchString'])) {
return new HtmlResponse(WCF::getTPL()->fetch('faqQuestionSearchDialog'));
}

$sql = "
SELECT faq_questions.questionID
Expand Down

0 comments on commit ec7c17a

Please sign in to comment.