From b8ba4a9ece154a2cbee4ad508e5872c2456b4d21 Mon Sep 17 00:00:00 2001
From: Michael Oehlhof <typo3@oehlhof.de>
Date: Thu, 26 Feb 2015 22:59:52 +0100
Subject: [PATCH] =?UTF-8?q?[TASK]=20Replace=20$GLOBALS[=E2=80=98LANG?=
 =?UTF-8?q?=E2=80=99]=20with=20local=20property=20in=20ext:aboutmodules?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
---
 .../Classes/Controller/ModulesController.php           | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/typo3/sysext/aboutmodules/Classes/Controller/ModulesController.php b/typo3/sysext/aboutmodules/Classes/Controller/ModulesController.php
index dcd01ad74405..5d2c20e7d87f 100644
--- a/typo3/sysext/aboutmodules/Classes/Controller/ModulesController.php
+++ b/typo3/sysext/aboutmodules/Classes/Controller/ModulesController.php
@@ -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;
-- 
GitLab