Skip to content
Snippets Groups Projects
Commit b8ba4a9e authored by Michael Oehlhof's avatar Michael Oehlhof Committed by Christian Kuhn
Browse files

[TASK] Replace $GLOBALS[‘LANG’] with local property in ext:aboutmodules

The local property languageService was only used in the indexAction.
In getModulesData and getSubModuleData there was still $GLOBALS[‘LANG’]
used, which is now changed to the local property languageService.

Resolves: #65368
Releases: master
Change-Id: Ibae1f34b7baa37d5693bdb8220f59c23c5bbac0c
Reviewed-on: http://review.typo3.org/37297


Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 3ac9aad2
Branches
Tags
No related merge requests found
......@@ -104,7 +104,7 @@ class ModulesController extends ActionController {
$mainModuleData = array();
$moduleKey = $moduleName . '_tab';
$mainModuleData['name'] = $moduleName;
$mainModuleData['label'] = $GLOBALS['LANG']->moduleLabels['tabs'][$moduleKey];
$mainModuleData['label'] = $this->languageService->moduleLabels['tabs'][$moduleKey];
if (is_array($moduleInfo['sub']) && count($moduleInfo['sub']) > 0) {
$mainModuleData['subModules'] = $this->getSubModuleData($moduleName, $moduleInfo['sub']);
}
......@@ -126,10 +126,10 @@ class ModulesController extends ActionController {
$subModuleKey = $moduleName . '_' . $subModuleName . '_tab';
$subModuleData = array();
$subModuleData['name'] = $subModuleName;
$subModuleData['icon'] = PathUtility::stripPathSitePrefix($GLOBALS['LANG']->moduleLabels['tabs_images'][$subModuleKey]);
$subModuleData['label'] = $GLOBALS['LANG']->moduleLabels['tabs'][$subModuleKey];
$subModuleData['shortDescription'] = $GLOBALS['LANG']->moduleLabels['labels'][$subModuleKey . 'label'];
$subModuleData['longDescription'] = $GLOBALS['LANG']->moduleLabels['labels'][$subModuleKey . 'descr'];
$subModuleData['icon'] = PathUtility::stripPathSitePrefix($this->languageService->moduleLabels['tabs_images'][$subModuleKey]);
$subModuleData['label'] = $this->languageService->moduleLabels['tabs'][$subModuleKey];
$subModuleData['shortDescription'] = $this->languageService->moduleLabels['labels'][$subModuleKey . 'label'];
$subModuleData['longDescription'] = $this->languageService->moduleLabels['labels'][$subModuleKey . 'descr'];
$subModulesData[] = $subModuleData;
}
return $subModulesData;
......
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