[BUGFIX] Indexed Search: Always add L parameter to links 82/47482/3
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:33:01 +0000 (11:33 +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/47482
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/indexed_search/Classes/Controller/SearchController.php
typo3/sysext/indexed_search/Classes/Controller/SearchFormController.php

index 7bf5f37..7b9ecd2 100644 (file)
@@ -1247,9 +1247,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
index ddb79fc..855196c 100755 (executable)
@@ -2187,9 +2187,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...