From 8e5d69f35f37fe937f5d2d7826119a88cd581cb4 Mon Sep 17 00:00:00 2001 From: Tony Air Date: Fri, 28 Apr 2023 20:53:40 +0200 Subject: [PATCH] [IMPR] Minor search improvements --- app/src/Pages/PageController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/Pages/PageController.php b/app/src/Pages/PageController.php index 292dda5..f6ac917 100644 --- a/app/src/Pages/PageController.php +++ b/app/src/Pages/PageController.php @@ -109,7 +109,7 @@ class PageController extends ContentController ) ), RequiredFields::create(['q']) - )->setFormMethod('POST'); + )->setFormMethod('GET'); $form->setLegend('Search ' . $config->getField('Title') . ' Website'); @@ -136,7 +136,8 @@ class PageController extends ContentController $pages = SiteTree::get()->filterAny([ 'Title:PartialMatch' => $term, 'Content:PartialMatch' => $term, - 'ClassName:not' => ErrorPage::class, + ])->exclude([ + 'ClassName' => ErrorPage::class, ])->sort('Created DESC'); $results->merge($pages);