Commit 81d7ce7c authored by Tymoteusz Motylewski's avatar Tymoteusz Motylewski Committed by Wouter Wolters
Browse files

[BUGFIX] Fix loading of language file in indexed_search

As $GLOBALS['LANG'] doesn't exist in the frontend context,
language (xlf) file has to be loaded through pi_loadLL.

Resolves: #69443
Releases: master
Change-Id: I7668acc3b899fe89e5aaf1a1cdb09dc7a36053e2
Reviewed-on: http://review.typo3.org/42946

Reviewed-by: Alexander Opitz's avatarAlexander Opitz <opitz.alexander@googlemail.com>
Tested-by: Alexander Opitz's avatarAlexander Opitz <opitz.alexander@googlemail.com>
Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
parent 66b5be61
......@@ -16,7 +16,6 @@ namespace TYPO3\CMS\IndexedSearch\Controller;
use TYPO3\CMS\Core\Html\HtmlParser;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Lang\LanguageService;
/**
* Index search frontend
......@@ -182,7 +181,7 @@ class SearchFormController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
public function main($content, $conf) {
// Initialize:
$this->conf = $conf;
$this->LOCAL_LANG = $this->getLanguageService()->includeLLFile('EXT:indexed_search/Resources/Private/Language/locallang_pi.xlf' , FALSE, TRUE);
$this->pi_loadLL('EXT:indexed_search/Resources/Private/Language/locallang_pi.xlf');
$this->pi_setPiVarDefaults();
// Initialize:
$this->initialize();
......@@ -2364,12 +2363,4 @@ class SearchFormController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
public function getJoinPagesForQuery() {
return (bool)$this->join_pages;
}
/**
* Returns the Language Service
* @return LanguageService
*/
protected function getLanguageService() {
return $GLOBALS['LANG'];
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment