[BUGFIX] Indexed Search: Always add L parameter to links 76/47476/2
authorTymoteusz Motylewski <t.motylewski@gmail.com>
Thu, 31 Mar 2016 21:31:58 +0000 (23:31 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 1 Apr 2016 09:31:16 +0000 (11:31 +0200)
Make linkPage method always add language parameter (L) to links
in search results.
This is especially important when you are showing results
from multiple languages on one page.

Resolves: #30852
Releases: master, 7.6
Change-Id: I6ed91335d6e0311a7ff2d98adf5581884d8b9303
Reviewed-on: https://review.typo3.org/47476
Reviewed-by: Susanne Moog <typo3@susannemoog.de>
Tested-by: Susanne Moog <typo3@susannemoog.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/compatibility7/Classes/Controller/SearchFormController.php
typo3/sysext/indexed_search/Classes/Controller/SearchController.php

index a97c405..5144c08 100755 (executable)
@@ -2166,9 +2166,7 @@ class SearchFormController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin
         if ($row['data_page_mp']) {
             $urlParameters['MP'] = $row['data_page_mp'];
         }
-        if ($row['sys_language_uid']) {
-            $urlParameters['L'] = $row['sys_language_uid'];
-        }
+        $urlParameters['L'] = intval($row['sys_language_uid']);
         // markup-GET vars:
         $urlParameters = array_merge($urlParameters, $markUpSwParams);
         // This will make sure that the path is retrieved if it hasn't been already. Used only for the sake of the domain_record thing...
index c68e1d4..2e75a46 100644 (file)
@@ -1253,9 +1253,7 @@ class SearchController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControlle
         if ($row['data_page_mp']) {
             $urlParameters['MP'] = $row['data_page_mp'];
         }
-        if ($row['sys_language_uid']) {
-            $urlParameters['L'] = $row['sys_language_uid'];
-        }
+        $urlParameters['L'] = intval($row['sys_language_uid']);
         // markup-GET vars:
         $urlParameters = array_merge($urlParameters, $markUpSwParams);
         // This will make sure that the path is retrieved if it hasn't been