[TASK] Superfluous comparison in Language 41/25741/3
authorWouter Wolters <typo3@wouterwolters.nl>
Thu, 28 Nov 2013 21:01:31 +0000 (22:01 +0100)
committerMarkus Klein <klein.t3@mfc-linz.at>
Tue, 17 Dec 2013 00:45:34 +0000 (01:45 +0100)
Fix superfluous comparison against boolean in
Laguage::getLanguages

Change-Id: Idbf4c1f234eb1c60c01ea130095759ef49ce71c0
Resolves: #54054
Releases: 6.2
Reviewed-on: https://review.typo3.org/25741
Reviewed-by: Xavier Perseguers
Reviewed-by: Michiel Roos
Tested-by: Michiel Roos
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/rtehtmlarea/Classes/Extension/Language.php

index 092151b..e4fabed 100644 (file)
@@ -129,8 +129,8 @@ class Language extends \TYPO3\CMS\Rtehtmlarea\RteHtmlAreaApi {
                                $where .= ' AND ' . $table . '.lg_iso_2 IN (' . $languageList . ')';
                        }
                        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($table . '.lg_iso_2,' . $table . '.lg_country_iso_2,' . $labelFields, $table, $where . ' AND lg_constructed = 0 ' . ($this->htmlAreaRTE->is_FE() ? $GLOBALS['TSFE']->sys_page->enableFields($table) : \TYPO3\CMS\Backend\Utility\BackendUtility::BEenableFields($table) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table)));
-                       $prefixLabelWithCode = !$this->thisConfig['buttons.']['language.']['prefixLabelWithCode'] ? FALSE : TRUE;
-                       $postfixLabelWithCode = !$this->thisConfig['buttons.']['language.']['postfixLabelWithCode'] ? FALSE : TRUE;
+                       $prefixLabelWithCode = (boolean)$this->thisConfig['buttons.']['language.']['prefixLabelWithCode'];
+                       $postfixLabelWithCode = (boolean)$this->thisConfig['buttons.']['language.']['postfixLabelWithCode'];
                        while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                                $code = strtolower($row['lg_iso_2']) . ($row['lg_country_iso_2'] ? '-' . strtoupper($row['lg_country_iso_2']) : '');
                                foreach ($titleFields as $titleField) {