Do not use `$__language` as template variable for iterations
authorMatthias Schmidt <gravatronics@live.com>
Thu, 18 Aug 2016 17:09:26 +0000 (19:09 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Thu, 18 Aug 2016 17:09:29 +0000 (19:09 +0200)
It is already internally used and thus can cause conflicts.

com.woltlab.wcf/templates/languageChooser.tpl
com.woltlab.wcf/templates/messageFormMultilingualism.tpl
com.woltlab.wcf/templates/pageHeaderUser.tpl
com.woltlab.wcf/templates/pageMenuMobile.tpl
wcfsetup/install/files/acp/templates/languageChooser.tpl

index 61b78e6b23c9d9d2da5c00b1951b1b89cf2ea85a..cc72886b5b250c302f007843525dd639ad0f5b3c 100644 (file)
@@ -7,8 +7,8 @@
                <dd id="{@$__languageChooserPrefix}languageIDContainer">
                        <noscript>
                                <select name="languageID" id="languageID">
-                                       {foreach from=$languages item=__language}
-                                               <option value="{@$__language->languageID}">{$__language}</option>
+                                       {foreach from=$languages item=_language}
+                                               <option value="{@$_language->languageID}">{$_language}</option>
                                        {/foreach}
                                </select>
                        </noscript>
        <script data-relocate="true">
                require(['WoltLabSuite/Core/Language/Chooser'], function(LanguageChooser) {
                        var languages = {
-                               {implode from=$languages item=__language}
-                                       '{@$__language->languageID}': {
-                                               iconPath: '{@$__language->getIconPath()|encodeJS}',
-                                               languageName: '{@$__language|encodeJS}'
+                               {implode from=$languages item=_language}
+                                       '{@$_language->languageID}': {
+                                               iconPath: '{@$_language->getIconPath()|encodeJS}',
+                                               languageName: '{@$_language|encodeJS}'
                                        }
                                {/implode}
                        };
index c237efaab30f76b993d94f388f14c4864b10e4e5..e9d6d22b822fd3c0aab9703950ad4a143490fe79 100644 (file)
        <script data-relocate="true">
                require(['WoltLabSuite/Core/Language/Chooser'], function(LanguageChooser) {
                        var languages = {
-                               {implode from=$availableContentLanguages item=__language}
-                                       '{@$__language->languageID}': {
-                                               iconPath: '{@$__language->getIconPath()|encodeJS}',
-                                               languageName: '{@$__language|encodeJS}'
+                               {implode from=$availableContentLanguages item=_language}
+                                       '{@$_language->languageID}': {
+                                               iconPath: '{@$_language->getIconPath()|encodeJS}',
+                                               languageName: '{@$_language|encodeJS}'
                                        }
                                {/implode}
                        };
index 41a1b3abf7f2c81eefc4b822bd9172b10847526f..b56592d6cf84c55268306421648cd0c3eaad2022 100644 (file)
                                        <script data-relocate="true">
                                                require(['EventHandler', 'WoltLabSuite/Core/Language/Chooser'], function(EventHandler, LanguageChooser) {
                                                        var languages = {
-                                                               {implode from=$__wcf->getLanguage()->getLanguages() item=__language}
-                                                                       '{@$__language->languageID}': {
-                                                                               iconPath: '{@$__language->getIconPath()|encodeJS}',
-                                                                               languageName: '{@$__language|encodeJS}',
-                                                                               languageCode: '{@$__language->languageCode|encodeJS}'
+                                                               {implode from=$__wcf->getLanguage()->getLanguages() item=_language}
+                                                                       '{@$_language->languageID}': {
+                                                                               iconPath: '{@$_language->getIconPath()|encodeJS}',
+                                                                               languageName: '{@$_language|encodeJS}',
+                                                                               languageCode: '{@$_language->languageCode|encodeJS}'
                                                                        }
                                                                {/implode}
                                                        };
index 05496375052e5c8eacd77d5d9b237c32fc3b5a0e..33f82d5d53fe00be5d92697772e231de62511980 100644 (file)
                                                <span class="menuOverlayItemTitle">{$__wcf->getLanguage()}</span>
                                        </a>
                                        <ol class="menuOverlayItemList" data-title="{lang}wcf.user.language{/lang}">
-                                               {foreach from=$__wcf->getLanguage()->getLanguages() item=__language}
-                                                       <li class="menuOverlayItem" data-more="com.woltlab.wcf.language" data-language-id="{@$__language->languageID}">
+                                               {foreach from=$__wcf->getLanguage()->getLanguages() item=_language}
+                                                       <li class="menuOverlayItem" data-more="com.woltlab.wcf.language" data-language-id="{@$_language->languageID}">
                                                                <a href="#" class="menuOverlayItemLink box24">
-                                                                       <img src="{$__language->getIconPath()}" alt="">
-                                                                       <span class="menuOverlayItemTitle">{$__language}</span>
+                                                                       <img src="{$_language->getIconPath()}" alt="">
+                                                                       <span class="menuOverlayItemTitle">{$_language}</span>
                                                                </a>
                                                        </li>
                                                {/foreach}
index 61b78e6b23c9d9d2da5c00b1951b1b89cf2ea85a..cc72886b5b250c302f007843525dd639ad0f5b3c 100644 (file)
@@ -7,8 +7,8 @@
                <dd id="{@$__languageChooserPrefix}languageIDContainer">
                        <noscript>
                                <select name="languageID" id="languageID">
-                                       {foreach from=$languages item=__language}
-                                               <option value="{@$__language->languageID}">{$__language}</option>
+                                       {foreach from=$languages item=_language}
+                                               <option value="{@$_language->languageID}">{$_language}</option>
                                        {/foreach}
                                </select>
                        </noscript>
        <script data-relocate="true">
                require(['WoltLabSuite/Core/Language/Chooser'], function(LanguageChooser) {
                        var languages = {
-                               {implode from=$languages item=__language}
-                                       '{@$__language->languageID}': {
-                                               iconPath: '{@$__language->getIconPath()|encodeJS}',
-                                               languageName: '{@$__language|encodeJS}'
+                               {implode from=$languages item=_language}
+                                       '{@$_language->languageID}': {
+                                               iconPath: '{@$_language->getIconPath()|encodeJS}',
+                                               languageName: '{@$_language|encodeJS}'
                                        }
                                {/implode}
                        };