Added feature #15942: locallangXMLOverride should not distinguish between paths endin...
authorSteffen Gebert <steffen.gebert@typo3.org>
Fri, 15 Oct 2010 10:12:43 +0000 (10:12 +0000)
committerSteffen Gebert <steffen.gebert@typo3.org>
Fri, 15 Oct 2010 10:12:43 +0000 (10:12 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9068 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_div.php

index 64ff1dd..b1d57d5 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-10-15  Steffen Gebert  <steffen@steffen-gebert.de>
+
+       * Added feature #15942: locallangXMLOverride should not distinguish between paths ending with php and xml (Thanks to Andreas Kiessling)
+
 2010-10-15  Benjamin Mack  <benni@typo3.org>
 
        * Added feature #15989: Create a new abstract class t3lib_message_abstractmessage
index f3267dd..ba64db7 100644 (file)
@@ -4675,8 +4675,20 @@ final class t3lib_div {
                                }
                                $fileNotFound = TRUE;
                        }
-                       if (is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride'][$fileRef])) {
-                               foreach ($GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride'][$fileRef] as $overrideFile) {
+
+
+                       $overrides = array();
+                       $fileRefWithoutExtension = preg_replace('/\.(php|xml)$/', '', $fileRef);
+
+                       if (is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride'][$fileRefWithoutExtension . '.php'])) {
+                               $overrides = array_merge($overrides, $GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride'][$fileRefWithoutExtension . '.php']);
+                       }
+                       if (is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride'][$fileRefWithoutExtension . '.xml'])) {
+                               $overrides = array_merge($overrides, $GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride'][$fileRefWithoutExtension . '.xml']);
+                       }
+
+                       if (count($overrides) > 0) {
+                               foreach ($overrides as $overrideFile) {
                                        $languageOverrideFileName = self::getFileAbsFileName($overrideFile);
                                        if (@is_file($languageOverrideFileName)) {
                                                $languageOverrideArray = self::readLLXMLfile($languageOverrideFileName, $langKey, $charset);