[TASK] Replace deprecated API calls and label references 53/43653/2 master
authorChetan Thapliyal <chetan.thapliyal@aoe.com>
Wed, 30 Sep 2015 11:01:43 +0000 (13:01 +0200)
committerStefan Rotsch <stefan.rotsch@aoemedia.de>
Wed, 30 Sep 2015 12:01:17 +0000 (14:01 +0200)
Change-Id: I468aea4be3c0157c12ab1d130163875b5b279fca
Reviewed-on: http://review.typo3.org/43653
Tested-by: Chetan Thapliyal <nospam.ct@gmail.com>
Reviewed-by: Chetan Thapliyal <nospam.ct@gmail.com>
Reviewed-by: Stefan Rotsch <stefan.rotsch@aoemedia.de>
Tested-by: Stefan Rotsch <stefan.rotsch@aoemedia.de>
ext_tables.php

index 7b5f9de..012850a 100644 (file)
@@ -1,12 +1,14 @@
 <?php
+
 if (!defined('TYPO3_MODE')) {
        die('Access denied.');
 }
 
+$langXml = 'EXT:languagevisibility/locallang_db.xml';
 $tempColumns = array(
        'tx_languagevisibility_fallbackorder' => array(
                'exclude' => 0,
-               'label' => 'LLL:EXT:languagevisibility/locallang_db.xml:sys_language.tx_languagevisibility_fallbackorder',
+               'label' => 'LLL:' . $langXml . ':sys_language.tx_languagevisibility_fallbackorder',
                'l10n_display' => 'hideDiff',
                'config' => array(
                        'type' => 'select',
@@ -22,7 +24,7 @@ $tempColumns = array(
        ),
        'tx_languagevisibility_fallbackorderel' => array(
                'exclude' => 0,
-               'label' => 'LLL:EXT:languagevisibility/locallang_db.xml:sys_language.tx_languagevisibility_fallbackorderel',
+               'label' => 'LLL:' . $langXml . ':sys_language.tx_languagevisibility_fallbackorderel',
                'displayCond' => 'FIELD:tx_languagevisibility_complexfallbacksetting:>=:1',
                'l10n_display' => 'hideDiff',
                'config' => array(
@@ -39,7 +41,7 @@ $tempColumns = array(
        ),
        'tx_languagevisibility_fallbackorderttnewsel' => array(
                'exclude' => 0,
-               'label' => 'LLL:EXT:languagevisibility/locallang_db.xml:sys_language.tx_languagevisibility_fallbackorderttnewsel',
+               'label' => 'LLL:' . $langXml . ':sys_language.tx_languagevisibility_fallbackorderttnewsel',
                'displayCond' => 'FIELD:tx_languagevisibility_complexfallbacksetting:>=:1',
                'l10n_display' => 'hideDiff',
                'config' => array(
@@ -56,15 +58,15 @@ $tempColumns = array(
        ),
        'tx_languagevisibility_defaultvisibility' => array(
                'exclude' => 0,
-               'label' => 'LLL:EXT:languagevisibility/locallang_db.xml:sys_language.tx_languagevisibility_defaultvisibility',
+               'label' => 'LLL:' . $langXml . ':sys_language.tx_languagevisibility_defaultvisibility',
                'config' => array(
                        'type' => 'select',
                        'items' => array(
                                array('',''),
-                               array('LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.yes', 'yes'),
-                               array('LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.no', 'no'),
-                               array('LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.t', 't'),
-                               array('LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.f', 'f'),
+                               array('LLL:' . $langXml . ':tx_languagevisibility_visibility.I.yes', 'yes'),
+                               array('LLL:' . $langXml . ':tx_languagevisibility_visibility.I.no', 'no'),
+                               array('LLL:' . $langXml . ':tx_languagevisibility_visibility.I.t', 't'),
+                               array('LLL:' . $langXml . ':tx_languagevisibility_visibility.I.f', 'f'),
                        ),
                        'default' => 'f',
                        'size' => 1,
@@ -73,15 +75,15 @@ $tempColumns = array(
        ),
        'tx_languagevisibility_defaultvisibilityel' => array(
                'exclude' => 0,
-               'label' => 'LLL:EXT:languagevisibility/locallang_db.xml:sys_language.tx_languagevisibility_defaultvisibilityel',
+               'label' => 'LLL:' . $langXml . ':sys_language.tx_languagevisibility_defaultvisibilityel',
                'config' => array(
                        'type' => 'select',
                        'items' => array(
                                array('',''),
-                               array('LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.yes', 'yes'),
-                               array('LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.no', 'no'),
-                               array('LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.t', 't'),
-                               array('LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.f', 'f'),
+                               array('LLL:' . $langXml . ':tx_languagevisibility_visibility.I.yes', 'yes'),
+                               array('LLL:' . $langXml . ':tx_languagevisibility_visibility.I.no', 'no'),
+                               array('LLL:' . $langXml . ':tx_languagevisibility_visibility.I.t', 't'),
+                               array('LLL:' . $langXml . ':tx_languagevisibility_visibility.I.f', 'f'),
                        ),
                        'default' => 'f',
                        'size' => 1,
@@ -90,15 +92,15 @@ $tempColumns = array(
        ),
        'tx_languagevisibility_defaultvisibilityttnewsel' => array(
                'exclude' => 0,
-               'label' => 'LLL:EXT:languagevisibility/locallang_db.xml:sys_language.tx_languagevisibility_defaultvisibilityttnewsel',
+               'label' => 'LLL:' . $langXml . ':sys_language.tx_languagevisibility_defaultvisibilityttnewsel',
                'config' => array(
                        'type' => 'select',
                        'items' => array(
                                array('',''),
-                               array('LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.yes', 'yes'),
-                               array('LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.no', 'no'),
-                               array('LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.t', 't'),
-                               array('LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.f', 'f'),
+                               array('LLL:' . $langXml . ':tx_languagevisibility_visibility.I.yes', 'yes'),
+                               array('LLL:' . $langXml . ':tx_languagevisibility_visibility.I.no', 'no'),
+                               array('LLL:' . $langXml . ':tx_languagevisibility_visibility.I.t', 't'),
+                               array('LLL:' . $langXml . ':tx_languagevisibility_visibility.I.f', 'f'),
                        ),
                        'default' => 'f',
                        'size' => 1,
@@ -107,19 +109,19 @@ $tempColumns = array(
        ),
        'tx_languagevisibility_complexfallbacksetting' => array(
                'exclude' => 0,
-               'label' => 'LLL:EXT:languagevisibility/locallang_db.xml:sys_language.tx_languagevisibility_complexfallbacksetting',
+               'label' => 'LLL:' . $langXml . ':sys_language.tx_languagevisibility_complexfallbacksetting',
                'config' => array(
                        'type' => 'check'
                )
        ),
 );
 
-t3lib_extMgm::addTCAcolumns('sys_language', $tempColumns, 1);
-t3lib_extMgm::addToAllTCAtypes('sys_language', 'tx_languagevisibility_defaultvisibility, tx_languagevisibility_fallbackorder;;;;1-1-1,tx_languagevisibility_complexfallbacksetting, tx_languagevisibility_defaultvisibilityttnewsel, tx_languagevisibility_fallbackorderttnewsel;;;;1-1-1, tx_languagevisibility_defaultvisibilityel, tx_languagevisibility_fallbackorderel;;;;1-1-1');
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('sys_language', $tempColumns, 1);
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('sys_language', 'tx_languagevisibility_defaultvisibility, tx_languagevisibility_fallbackorder;;;;1-1-1,tx_languagevisibility_complexfallbacksetting, tx_languagevisibility_defaultvisibilityttnewsel, tx_languagevisibility_fallbackorderttnewsel;;;;1-1-1, tx_languagevisibility_defaultvisibilityel, tx_languagevisibility_fallbackorderel;;;;1-1-1');
 $tempColumnsElements = array(
        'tx_languagevisibility_visibility' => array(
                'exclude' => 1,
-               'label' => 'LLL:EXT:languagevisibility/locallang_db.xml:pages.tx_languagevisibility_visibility',
+               'label' => 'LLL:' . $langXml . ':pages.tx_languagevisibility_visibility',
                'config' => array(
                        'type' => 'user',
                        'size' => '30',
@@ -131,7 +133,7 @@ $tempColumnsElements = array(
 $tempColumnsPages = array(
        'tx_languagevisibility_visibility' => array(
                'exclude' => 1,
-               'label' => 'LLL:EXT:languagevisibility/locallang_db.xml:pages.tx_languagevisibility_visibility',
+               'label' => 'LLL:' . $langXml . ':pages.tx_languagevisibility_visibility',
                'config' => array(
                        'type' => 'user',
                        'size' => '30',
@@ -140,7 +142,7 @@ $tempColumnsPages = array(
        ),
        'tx_languagevisibility_inheritanceflag_original' => array(
                'exclude' => 1,
-               'label' => 'LLL:EXT:l10nmgr/locallang_db.xml:pages.tx_languagevisibility_visibility',
+               'label' => 'LLL:' . $langXml . ':pages.tx_languagevisibility_inheritanceflag_original',
                'config' => array(
                        'type' => 'check',
                        'default' => '0'
@@ -148,7 +150,7 @@ $tempColumnsPages = array(
        ),
        'tx_languagevisibility_inheritanceflag_overlayed' => array(
                'exclude' => 1,
-               'label' => 'LLL:EXT:l10nmgr/locallang_db.xml:pages.tx_languagevisibility_visibility',
+               'label' => 'LLL:' . $langXml . ':pages.tx_languagevisibility_inheritanceflag_overlayed',
                'config' => array(
                        'type' => 'check',
                        'default' => '0'
@@ -156,41 +158,41 @@ $tempColumnsPages = array(
        ),
 );
 
-t3lib_extMgm::addTCAcolumns('pages', $tempColumnsPages, 1);
-t3lib_extMgm::addToAllTCAtypes('pages', '--div--;LLL:EXT:languagevisibility/locallang_db.xml:tabname,tx_languagevisibility_visibility;;;;1-1-1', '', 'after:php_tree_stop');
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages', $tempColumnsPages, 1);
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('pages', '--div--;LLL:' . $langXml . ':tabname,tx_languagevisibility_visibility;;;;1-1-1', '', 'after:php_tree_stop');
 
-t3lib_extMgm::addTCAcolumns('pages_language_overlay', $tempColumnsPages,1);
-t3lib_extMgm::addToAllTCAtypes('pages_language_overlay', '--div--;LLL:EXT:languagevisibility/locallang_db.xml:tabname,tx_languagevisibility_visibility;;;;1-1-1', '', '');
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages_language_overlay', $tempColumnsPages,1);
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('pages_language_overlay', '--div--;LLL:' . $langXml . ':tabname,tx_languagevisibility_visibility;;;;1-1-1', '', '');
 
-t3lib_extMgm::addTCAcolumns('tt_news', $tempColumnsElements,1);
-t3lib_extMgm::addToAllTCAtypes('tt_news', '--div--;LLL:EXT:languagevisibility/locallang_db.xml:tabname,tx_languagevisibility_visibility;;;;1-1-1');
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_news', $tempColumnsElements,1);
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('tt_news', '--div--;LLL:' . $langXml . ':tabname,tx_languagevisibility_visibility;;;;1-1-1');
 
-t3lib_extMgm::addTCAcolumns('tt_content', $tempColumnsElements,1);
-t3lib_extMgm::addToAllTCAtypes('tt_content', '--div--;LLL:EXT:languagevisibility/locallang_db.xml:tabname,tx_languagevisibility_visibility;;;;1-1-1,sys_language_uid,l18n_parent', '', 'before:--div--;LLL:EXT:cms/locallang_ttc.xml:tabs.extended');
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', $tempColumnsElements,1);
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('tt_content', '--div--;LLL:' . $langXml . ':tabname,tx_languagevisibility_visibility;;;;1-1-1,sys_language_uid,l18n_parent', '', 'before:--div--;LLL:EXT:cms/locallang_ttc.xml:tabs.extended');
 
-$GLOBALS['TCA']['tt_content']['palettes']['general']['showitem'] = str_replace('sys_language_uid;LLL:EXT:cms/locallang_ttc.xml:sys_language_uid_formlabel', '', $GLOBALS['TCA']['tt_content']['palettes']['general']['showitem']);
+$GLOBALS['TCA']['tt_content']['palettes']['general']['showitem'] = str_replace('sys_language_uid;LLL:EXT:cms/locallang_ttc.xlf:sys_language_uid_formlabel', '', $GLOBALS['TCA']['tt_content']['palettes']['general']['showitem']);
 
 $GLOBALS['TCA']['tt_content']['ctrl']['dividers2tabs'] = TRUE;
 
 $tempColumns = array(
        'tx_languagevisibility_allow_movecutdelete_foroverlays' => array(
                'exclude' => 1,
-               'label' => 'LLL:EXT:languagevisibility/locallang_db.xml:be_groups.allow_movecutdelete_foroverlays:',
+               'label' => 'LLL:' . $langXml . ':be_groups.allow_movecutdelete_foroverlays:',
                'config' => array(
                        'type' => 'check'
                )
        ),
 );
 
-t3lib_extMgm::addTCAcolumns('be_groups', $tempColumns, 1);
-t3lib_extMgm::addToAllTCAtypes('be_groups', '--div--;LLL:EXT:languagevisibility/locallang_db.xml:tabname,tx_languagevisibility_allow_movecutdelete_foroverlays;;;;1-1-1');
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('be_groups', $tempColumns, 1);
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('be_groups', '--div--;LLL:' . $langXml . ':tabname,tx_languagevisibility_allow_movecutdelete_foroverlays;;;;1-1-1');
 
-if (TYPO3_MODE=='BE') {
-       t3lib_extMgm::insertModuleFunction(
+if (TYPO3_MODE == 'BE') {
+       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction(
                'web_info',
                'tx_languagevisibility_modfunc1',
-               t3lib_extMgm::extPath($_EXTKEY) . 'modfunc1/class.tx_languagevisibility_modfunc1.php',
-               'LLL:EXT:languagevisibility/locallang_db.xml:moduleFunction.tx_languagevisibility_modfunc1'
+               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'modfunc1/class.tx_languagevisibility_modfunc1.php',
+               'LLL:' . $langXml . ':moduleFunction.tx_languagevisibility_modfunc1'
        );
 }