[TASK] Move frontend registration from EXT:cms to EXT:frontend 68/37368/2
authorBenjamin Mack <benni@typo3.org>
Sat, 28 Feb 2015 18:56:46 +0000 (19:56 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 28 Feb 2015 20:44:09 +0000 (21:44 +0100)
EXT:cms still registers logic that is completely placed
inside EXT:frontend (classes, content element wizards, tables, CTypes).

These leftovers are moved to EXT:frontend.

Resolves: #65418
Releases: master
Change-Id: I3919340de863a7b1c07149161d2ce758e42de4db
Reviewed-on: http://review.typo3.org/37368
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/cms/ext_localconf.php [deleted file]
typo3/sysext/cms/ext_tables.php
typo3/sysext/frontend/ext_localconf.php
typo3/sysext/frontend/ext_tables.php [new file with mode: 0644]

diff --git a/typo3/sysext/cms/ext_localconf.php b/typo3/sysext/cms/ext_localconf.php
deleted file mode 100644 (file)
index 4bb5847..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-<?php
-defined('TYPO3_MODE') or die();
-
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig('
-       options.saveDocView = 1
-       options.saveDocNew = 1
-       options.saveDocNew.pages = 0
-       options.saveDocNew.sys_file = 0
-       options.disableDelete.sys_file = 1
-       TCAdefaults.tt_content.imagecols = 2
-');
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('
-mod.wizards.newContentElement {
-       renderMode = tabs
-       wizardItems {
-               common.header = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common
-               common.elements {
-                       header {
-                               icon = gfx/c_wiz/regular_header.gif
-                               title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_headerOnly_title
-                               description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_headerOnly_description
-                               tt_content_defValues {
-                                       CType = header
-                               }
-                       }
-                       text {
-                               icon = gfx/c_wiz/regular_text.gif
-                               title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_regularText_title
-                               description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_regularText_description
-                               tt_content_defValues {
-                                       CType = text
-                               }
-                       }
-                       textpic {
-                               icon = gfx/c_wiz/text_image_right.gif
-                               title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_textImage_title
-                               description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_textImage_description
-                               tt_content_defValues {
-                                       CType = textpic
-                                       imageorient = 17
-                               }
-                       }
-                       image {
-                               icon = gfx/c_wiz/images_only.gif
-                               title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_imagesOnly_title
-                               description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_imagesOnly_description
-                               tt_content_defValues {
-                                       CType = image
-                               }
-                       }
-                       bullets {
-                               icon = gfx/c_wiz/bullet_list.gif
-                               title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_bulletList_title
-                               description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_bulletList_description
-                               tt_content_defValues {
-                                       CType = bullets
-                               }
-                       }
-                       table {
-                               icon = gfx/c_wiz/table.gif
-                               title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_table_title
-                               description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_table_description
-                               tt_content_defValues {
-                                       CType = table
-                               }
-                       }
-
-               }
-               common.show = header,text,textpic,image,bullets,table
-
-               special.header = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special
-               special.elements {
-                       uploads {
-                               icon = gfx/c_wiz/filelinks.gif
-                               title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_filelinks_title
-                               description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_filelinks_description
-                               tt_content_defValues {
-                                       CType = uploads
-                               }
-                       }
-                       menu {
-                               icon = gfx/c_wiz/sitemap2.gif
-                               title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_menus_title
-                               description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_menus_description
-                               tt_content_defValues {
-                                       CType = menu
-                                       menu_type = 0
-                               }
-                       }
-                       html {
-                               icon = gfx/c_wiz/html.gif
-                               title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_plainHTML_title
-                               description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_plainHTML_description
-                               tt_content_defValues {
-                                       CType = html
-                               }
-                       }
-                       div {
-                               icon = gfx/c_wiz/div.gif
-                               title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_divider_title
-                               description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_divider_description
-                               tt_content_defValues {
-                                       CType = div
-                               }
-                       }
-                       shortcut {
-                               icon = gfx/c_wiz/shortcut.gif
-                               title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_shortcut_title
-                               description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_shortcut_description
-                               tt_content_defValues {
-                                       CType = shortcut
-                               }
-                       }
-
-               }
-               special.show = uploads,menu,html,div,shortcut
-
-               # dummy placeholder for forms group
-               forms.header = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:forms
-
-               plugins.header = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:plugins
-               plugins.elements {
-                       general {
-                               icon = gfx/c_wiz/user_defined.gif
-                               title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:plugins_general_title
-                               description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:plugins_general_description
-                               tt_content_defValues.CType = list
-                       }
-               }
-               plugins.show = *
-       }
-}
-
-');
-
-// Registering hooks for the treelist cache
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \TYPO3\CMS\Frontend\Hooks\TreelistCacheUpdateHooks::class;
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] = \TYPO3\CMS\Frontend\Hooks\TreelistCacheUpdateHooks::class;
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['moveRecordClass'][] = \TYPO3\CMS\Frontend\Hooks\TreelistCacheUpdateHooks::class;
-
-// Register search keys
-$GLOBALS['TYPO3_CONF_VARS']['SYS']['livesearch']['page'] = 'pages';
-$GLOBALS['TYPO3_CONF_VARS']['SYS']['livesearch']['content'] = 'tt_content';
-// Register hook to show preview info
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_previewInfo']['cms'] = \TYPO3\CMS\Frontend\Hooks\FrontendHooks::class . '->hook_previewInfo';
index 363ca30..0c80c66 100644 (file)
@@ -17,5 +17,3 @@ if (TYPO3_MODE === 'BE') {
                'LLL:EXT:cms/locallang_tca.xlf:mod_tx_cms_webinfo_lang'
        );
 }
-// Add allowed records to pages:
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('pages_language_overlay,tt_content,sys_template,sys_domain,backend_layout');
index 33e1487..3026fce 100644 (file)
@@ -57,3 +57,148 @@ if (TYPO3_MODE === 'FE') {
                'EDITPANEL'        => \TYPO3\CMS\Frontend\ContentObject\EditPanelContentObject::class
        ));
 }
+
+
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig('
+       options.saveDocView = 1
+       options.saveDocNew = 1
+       options.saveDocNew.pages = 0
+       options.saveDocNew.sys_file = 0
+       options.disableDelete.sys_file = 1
+       TCAdefaults.tt_content.imagecols = 2
+');
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('
+mod.wizards.newContentElement {
+       renderMode = tabs
+       wizardItems {
+               common.header = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common
+               common.elements {
+                       header {
+                               icon = gfx/c_wiz/regular_header.gif
+                               title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_headerOnly_title
+                               description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_headerOnly_description
+                               tt_content_defValues {
+                                       CType = header
+                               }
+                       }
+                       text {
+                               icon = gfx/c_wiz/regular_text.gif
+                               title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_regularText_title
+                               description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_regularText_description
+                               tt_content_defValues {
+                                       CType = text
+                               }
+                       }
+                       textpic {
+                               icon = gfx/c_wiz/text_image_right.gif
+                               title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_textImage_title
+                               description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_textImage_description
+                               tt_content_defValues {
+                                       CType = textpic
+                                       imageorient = 17
+                               }
+                       }
+                       image {
+                               icon = gfx/c_wiz/images_only.gif
+                               title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_imagesOnly_title
+                               description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_imagesOnly_description
+                               tt_content_defValues {
+                                       CType = image
+                               }
+                       }
+                       bullets {
+                               icon = gfx/c_wiz/bullet_list.gif
+                               title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_bulletList_title
+                               description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_bulletList_description
+                               tt_content_defValues {
+                                       CType = bullets
+                               }
+                       }
+                       table {
+                               icon = gfx/c_wiz/table.gif
+                               title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_table_title
+                               description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_table_description
+                               tt_content_defValues {
+                                       CType = table
+                               }
+                       }
+
+               }
+               common.show = header,text,textpic,image,bullets,table
+
+               special.header = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special
+               special.elements {
+                       uploads {
+                               icon = gfx/c_wiz/filelinks.gif
+                               title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_filelinks_title
+                               description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_filelinks_description
+                               tt_content_defValues {
+                                       CType = uploads
+                               }
+                       }
+                       menu {
+                               icon = gfx/c_wiz/sitemap2.gif
+                               title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_menus_title
+                               description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_menus_description
+                               tt_content_defValues {
+                                       CType = menu
+                                       menu_type = 0
+                               }
+                       }
+                       html {
+                               icon = gfx/c_wiz/html.gif
+                               title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_plainHTML_title
+                               description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_plainHTML_description
+                               tt_content_defValues {
+                                       CType = html
+                               }
+                       }
+                       div {
+                               icon = gfx/c_wiz/div.gif
+                               title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_divider_title
+                               description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_divider_description
+                               tt_content_defValues {
+                                       CType = div
+                               }
+                       }
+                       shortcut {
+                               icon = gfx/c_wiz/shortcut.gif
+                               title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_shortcut_title
+                               description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_shortcut_description
+                               tt_content_defValues {
+                                       CType = shortcut
+                               }
+                       }
+
+               }
+               special.show = uploads,menu,html,div,shortcut
+
+               # dummy placeholder for forms group
+               forms.header = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:forms
+
+               plugins.header = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:plugins
+               plugins.elements {
+                       general {
+                               icon = gfx/c_wiz/user_defined.gif
+                               title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:plugins_general_title
+                               description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:plugins_general_description
+                               tt_content_defValues.CType = list
+                       }
+               }
+               plugins.show = *
+       }
+}
+
+');
+
+// Registering hooks for the treelist cache
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \TYPO3\CMS\Frontend\Hooks\TreelistCacheUpdateHooks::class;
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] = \TYPO3\CMS\Frontend\Hooks\TreelistCacheUpdateHooks::class;
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['moveRecordClass'][] = \TYPO3\CMS\Frontend\Hooks\TreelistCacheUpdateHooks::class;
+
+// Register search keys
+$GLOBALS['TYPO3_CONF_VARS']['SYS']['livesearch']['page'] = 'pages';
+$GLOBALS['TYPO3_CONF_VARS']['SYS']['livesearch']['content'] = 'tt_content';
+
+// Register hook to show preview info
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_previewInfo']['cms'] = \TYPO3\CMS\Frontend\Hooks\FrontendHooks::class . '->hook_previewInfo';
diff --git a/typo3/sysext/frontend/ext_tables.php b/typo3/sysext/frontend/ext_tables.php
new file mode 100644 (file)
index 0000000..bb7b47f
--- /dev/null
@@ -0,0 +1,5 @@
+<?php
+defined('TYPO3_MODE') or die();
+
+// Add allowed records to pages
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('pages_language_overlay,tt_content,sys_template,sys_domain,backend_layout');