[BUGFIX] RTE Language extension refers to non-existent method 11/33211/2
authorStanislas Rolland <typo3@sjbr.ca>
Wed, 8 Oct 2014 20:14:11 +0000 (16:14 -0400)
committerStanislas Rolland <typo3@sjbr.ca>
Wed, 8 Oct 2014 20:52:48 +0000 (22:52 +0200)
RTE Language extension refers to non-existent method
tx_staticinfotables_div::getCurrentLanguage in Static Info Tables.

Releases: master, 6.2
Resolves: #62111
Change-Id: I9a37a40da367f47da9ee3a015537e79d3ff5a88a
Reviewed-on: http://review.typo3.org/33210
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Stanislas Rolland <typo3@sjbr.ca>
Tested-by: Stanislas Rolland <typo3@sjbr.ca>
(cherry picked from commit 5059981b809b9721fcf5c615ab0b3992a7894ee7)
Reviewed-on: http://review.typo3.org/33211

typo3/sysext/rtehtmlarea/Classes/Extension/Language.php

index 30f86c1..22b2b61 100644 (file)
@@ -54,9 +54,7 @@ class Language extends \TYPO3\CMS\Rtehtmlarea\RteHtmlAreaApi {
        );
 
        public function main($parentObject) {
-               if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('static_info_tables') && file_exists(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('static_info_tables') . 'class.tx_staticinfotables_div.php')) {
-                       require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('static_info_tables') . 'class.tx_staticinfotables_div.php';
-               } else {
+               if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('static_info_tables')) {
                        $this->pluginButtons = \TYPO3\CMS\Core\Utility\GeneralUtility::rmFromList('language', $this->pluginButtons);
                }
                return parent::main($parentObject);
@@ -106,8 +104,8 @@ class Language extends \TYPO3\CMS\Rtehtmlarea\RteHtmlAreaApi {
                if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('static_info_tables')) {
                        $where = '1=1';
                        $table = 'static_languages';
-                       $lang = \tx_staticinfotables_div::getCurrentLanguage();
-                       $titleFields = \tx_staticinfotables_div::getTCAlabelField($table, TRUE, $lang);
+                       $lang = \SJBR\StaticInfoTables\Utility\LocalizationUtility::getCurrentLanguage();
+                       $titleFields = \SJBR\StaticInfoTables\Utility\LocalizationUtility::getLabelFields($table, $lang);
                        $prefixedTitleFields = array();
                        foreach ($titleFields as $titleField) {
                                $prefixedTitleFields[] = $table . '.' . $titleField;