|
@@ -297,19 +297,23 @@ class SearchController extends Controller
|
297
|
297
|
public function globalAction(Request $request)
|
298
|
298
|
{
|
299
|
299
|
$form = $this->getGlobalSearchForm($searcher = new GlobalSearcher());
|
300
|
|
- $form->bindRequest($request);
|
301
|
300
|
$results = array(
|
302
|
301
|
'users' => null,
|
303
|
302
|
'groups' => null,
|
304
|
303
|
'elements' => null
|
305
|
304
|
);
|
306
|
|
- if ($form->isValid())
|
|
305
|
+
|
|
306
|
+ if ($request->getMethod() == 'POST')
|
307
|
307
|
{
|
308
|
|
- $results = $searcher->getResults(
|
309
|
|
- $this->getDoctrine(),
|
310
|
|
- $this->getUserId(),
|
311
|
|
- $this->container->getParameter('search_global_elements_word_min_length')
|
312
|
|
- );
|
|
308
|
+ $form->bindRequest($request);
|
|
309
|
+ if ($form->isValid())
|
|
310
|
+ {
|
|
311
|
+ $results = $searcher->getResults(
|
|
312
|
+ $this->getDoctrine(),
|
|
313
|
+ $this->getUserId(),
|
|
314
|
+ $this->container->getParameter('search_global_elements_word_min_length')
|
|
315
|
+ );
|
|
316
|
+ }
|
313
|
317
|
}
|
314
|
318
|
|
315
|
319
|
return array(
|