[BUGFIX] Use $this-> instead of $GLOBALS['LANG'] in LanguageService 74/45374/3
authorBenni Mack <benni@typo3.org>
Sat, 19 Dec 2015 20:37:06 +0000 (21:37 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Mon, 21 Dec 2015 11:48:11 +0000 (12:48 +0100)
The method getLabelsWithPrefix was moved to LanguageService and does not
use $this but currently uses $GLOBALS['LANG'].

This is not necessary and is changed accordingly.

Resolves: #72343
Releases: master
Change-Id: If4c0b37827ef66f33f7261018f5e44cab3a2d363
Reviewed-on: https://review.typo3.org/45374
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Tested-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/lang/Classes/LanguageService.php

index e1be40d..767eb73 100644 (file)
@@ -475,7 +475,7 @@ class LanguageService
     public function getLabelsWithPrefix($prefix, $strip = '')
     {
         $extraction = array();
-        $labels = array_merge((array)$GLOBALS['LOCAL_LANG']['default'], (array)$GLOBALS['LOCAL_LANG'][$GLOBALS['LANG']->lang]);
+        $labels = array_merge((array)$GLOBALS['LOCAL_LANG']['default'], (array)$GLOBALS['LOCAL_LANG'][$this->lang]);
         // Regular expression to strip the selection prefix and possibly something from the label name:
         $labelPattern = '#^' . preg_quote($prefix, '#') . '(' . preg_quote($strip, '#') . ')?#';
         // Iterate through all locallang labels: