Follow-up to #50804: Entities not sorted according to locale collation
authorstan <stan@735d13b6-9817-0410-8766-e36946ffe9aa>
Fri, 17 Jan 2014 00:06:11 +0000 (00:06 +0000)
committerstan <stan@735d13b6-9817-0410-8766-e36946ffe9aa>
Fri, 17 Jan 2014 00:06:11 +0000 (00:06 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/static_info_tables/trunk@83251 735d13b6-9817-0410-8766-e36946ffe9aa

ChangeLog
Classes/Hook/Backend/Form/ElementRenderingHelper.php
Classes/Utility/LocalizationUtility.php

index 7a632dc..6bb272e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@
        * Clean-up in class SJBR\StaticInfoTables\Hook\Backend\Form\SuggestReceiver
        * Clean-up in class SJBR\StaticInfoTables\Hook\Backend\Form\ElementRenderingHelper
        * Add TYPO3 version range dependency to generated language pack extension
+       * Follow-up to #50804: Entities not sorted according to locale collation
 
 2013-12-03  Stanislas Rolland  <typo3@sjbr.ca>
 
index 432da83..cae723e 100644 (file)
@@ -189,7 +189,8 @@ class ElementRenderingHelper {
                        }
                        setlocale(LC_COLLATE, $currentLocale);
                }
-               return $translatedItems;
+               $items = $translatedItems;
+               return $items;
        }
 
        /**
index 4bcb5ea..c3a36fc 100644 (file)
@@ -274,7 +274,10 @@ class LocalizationUtility {
        public static function setCollatingLocale() {
                if (self::$collatingLocale === '') {
                        $languageCode = self::getCurrentLanguage();
-                       $languageRepository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('SJBR\\StaticInfoTables\\Domain\\Repository\\LanguageRepository');
+                       /** @var $objectManager \TYPO3\CMS\Extbase\Object\ObjectManager */
+                       $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
+                       /** @var $languageRepository SJBR\StaticInfoTables\Domain\Repository\LanguageRepository */
+                       $languageRepository = $objectManager->get('SJBR\\StaticInfoTables\\Domain\\Repository\\LanguageRepository');
                        list($languageIsoCodeA2, $countryIsoCodeA2) = explode('_', $languageCode, 2);
                        $language = $languageRepository->findOneByIsoCodes($languageIsoCodeA2, $countryIsoCodeA2 ? $countryIsoCodeA2 : '');
                        self::$collatingLocale = $language->getCollatingLocale();