Fixed bug #10532: htmlArea RTE: language code of lang attribute should be lower case
authorStanislas Rolland <typo3@sjbr.ca>
Tue, 24 Feb 2009 02:38:22 +0000 (02:38 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Tue, 24 Feb 2009 02:38:22 +0000 (02:38 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5061 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/rtehtmlarea/ChangeLog
typo3/sysext/rtehtmlarea/extensions/Language/class.tx_rtehtmlarea_language.php

index fa0aad7..b6d4aa4 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2009-02-23  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed bug #10531: htmlArea RTE: JS error may be raised by Opera on page unload
+       * Fixed bug #10532: htmlArea RTE: language code of lang attribute should be lower case
 
 2009-02-22  Steffen Kamper  <info@sk-typo3.de>
 
index 8f92a87..5c744d0 100644 (file)
@@ -1,6 +1,7 @@
 2009-02-23  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed bug #10531: htmlArea RTE: JS error may be raised by Opera on page unload
+       * Fixed bug #10532: htmlArea RTE: language code of lang attribute should be lower case
 
 2009-02-22  Stanislas Rolland  <typo3@sjbr.ca>
 
index 0512cd1..1f9ba13 100644 (file)
@@ -126,7 +126,7 @@ class tx_rtehtmlarea_language extends tx_rtehtmlareaapi {
                $prefixLabelWithCode = !$this->thisConfig['buttons.']['language.']['prefixLabelWithCode'] ? false : true;
                $postfixLabelWithCode = !$this->thisConfig['buttons.']['language.']['postfixLabelWithCode'] ? false : true;
                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
-                       $code = $row['lg_iso_2'].($row['lg_country_iso_2']?'_'.$row['lg_country_iso_2']:'');
+                       $code = strtolower($row['lg_iso_2']).($row['lg_country_iso_2']?'-'.strtoupper($row['lg_country_iso_2']):'');
                        foreach ($titleFields as $titleField) {
                                if ($row[$titleField]) {
                                        $nameArray[$code] = $this->htmlAreaRTE->is_FE() ? $GLOBALS['TSFE']->csConv($row[$titleField], $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['static_info_tables']['charset']) : ($this->htmlAreaRTE->TCEform->inline->isAjaxCall ? $GLOBALS['LANG']->csConvObj->utf8_encode($row[$titleField], $GLOBALS['LANG']->charSet) : $row[$titleField]);