[!!!][TASK] Move EXT:func_wizard to legacy extension 71/35171/2
authorBenjamin Mack <benni@typo3.org>
Mon, 8 Dec 2014 21:03:19 +0000 (22:03 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Tue, 9 Dec 2014 13:48:31 +0000 (14:48 +0100)
Web=>Functions=>Wizard is not needed
anymore, as both wizard extensions hook
into Web=>Functions directly since TYPO3 CMS 7.

For compatibility reasons the
WizardControllerModuleFunction is kept
(e.g. for templavoila) but moved to EXT:compatibility6.

The whole "func_wizard" Extension is not
needed anymore and is removed.

Resolves: #63687
Releases: master
Change-Id: I58e93652859bbdb816335322a9b964ec14cb84ee
Reviewed-on: http://review.typo3.org/35171
Reviewed-by: Cedric Ziel <cedric@cedric-ziel.com>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Susanne Moog <typo3@susannemoog.de>
Tested-by: Susanne Moog <typo3@susannemoog.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
13 files changed:
typo3/sysext/compatibility6/Classes/Controller/WebFunctionWizardsBaseController.php [new file with mode: 0644]
typo3/sysext/compatibility6/Migrations/Code/ClassAliasMap.php
typo3/sysext/compatibility6/Resources/Private/Language/wizards.xlf [new file with mode: 0644]
typo3/sysext/compatibility6/Resources/Private/Language/wizards_csh.xlf [new file with mode: 0644]
typo3/sysext/compatibility6/ext_tables.php [new file with mode: 0644]
typo3/sysext/core/Documentation/Changelog/master/Breaking-63687-WebFunctionsWizards-Moved.rst [new file with mode: 0644]
typo3/sysext/func_wizards/Classes/Controller/WebFunctionWizardsBaseController.php [deleted file]
typo3/sysext/func_wizards/composer.json [deleted file]
typo3/sysext/func_wizards/ext_emconf.php [deleted file]
typo3/sysext/func_wizards/ext_icon.gif [deleted file]
typo3/sysext/func_wizards/ext_tables.php [deleted file]
typo3/sysext/func_wizards/locallang.xlf [deleted file]
typo3/sysext/func_wizards/locallang_csh.xlf [deleted file]

diff --git a/typo3/sysext/compatibility6/Classes/Controller/WebFunctionWizardsBaseController.php b/typo3/sysext/compatibility6/Classes/Controller/WebFunctionWizardsBaseController.php
new file mode 100644 (file)
index 0000000..2df6544
--- /dev/null
@@ -0,0 +1,89 @@
+<?php
+namespace TYPO3\CMS\Compatibility6\Controller;
+
+/**
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+/**
+ * The Wizard function in the Web>Info module
+ * Creates a framework for adding wizard sub-sub-modules under the Wizard function in Web>Info
+ *
+ * @author Kasper Skårhøj <kasperYYYY@typo3.com>
+ */
+class WebFunctionWizardsBaseController extends \TYPO3\CMS\Backend\Module\AbstractFunctionModule {
+
+       /**
+        * @var string
+        */
+       public $function_key = 'wiz';
+
+       /**
+        * Initialize.
+        * Calls parent init function and then the handleExternalFunctionValue() function from the parent class
+        *
+        * @param object $pObj A reference to the parent (calling) object (which is probably an instance of an extension class to \TYPO3\CMS\Backend\Module\BaseScriptClass)
+        * @param array $conf The configuration set for this module - from global array TBE_MODULES_EXT
+        * @return void
+        */
+       public function init(&$pObj, $conf) {
+               // OK, handles ordinary init. This includes setting up the menu array with ->modMenu
+               parent::init($pObj, $conf);
+               // Making sure that any further external classes are added to the include_once array.
+               // Notice that inclusion happens twice in the main script because of this!!!
+               $this->handleExternalFunctionValue();
+       }
+
+       /**
+        * Modifies parent objects internal MOD_MENU array, adding items this module needs.
+        *
+        * @return array Items merged with the parent objects.
+        */
+       public function modMenu() {
+               $GLOBALS['LANG']->includeLLFile('EXT:func_wizards/locallang.xlf');
+               $modMenuAdd = array(
+                       $this->function_key => array()
+               );
+               $modMenuAdd[$this->function_key] = $this->pObj->mergeExternalItems($this->pObj->MCONF['name'], $this->function_key, $modMenuAdd[$this->function_key]);
+               $modMenuAdd[$this->function_key] = \TYPO3\CMS\Backend\Utility\BackendUtility::unsetMenuItems(
+                       $this->pObj->modTSconfig['properties'],
+                       $modMenuAdd[$this->function_key],
+                       'menu.' . $this->function_key
+               );
+               return $modMenuAdd;
+       }
+
+       /**
+        * Creation of the main content. Calling extObjContent() to trigger content generation from the sub-sub modules
+        *
+        * @return string The content
+        */
+       public function main() {
+               $menu = \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu(
+                       $this->pObj->id,
+                       'SET[wiz]',
+                       $this->pObj->MOD_SETTINGS['wiz'],
+                       $this->pObj->MOD_MENU['wiz']
+               );
+
+               $content = '';
+               if (!empty($menu)) {
+                       $menu = $GLOBALS['LANG']->getLL('wiz_lWizards', TRUE) . ': ' . $menu;
+                       $content = $this->pObj->doc->section('', '<span class="nobr">' . $menu . '</span>');
+                       $content .= $this->pObj->doc->spacer(20);
+               }
+
+               $content .= $this->extObjContent();
+               return $content;
+       }
+
+}
index 35b2047..cd74a1f 100644 (file)
@@ -1021,7 +1021,8 @@ return array(
        'tslib_AdminPanel' => \TYPO3\CMS\Frontend\View\AdminPanelView::class,
        'tslib_adminPanelHook' => \TYPO3\CMS\Frontend\View\AdminPanelViewHookInterface::class,
        'SC_mod_web_func_index' => \TYPO3\CMS\Func\Controller\PageFunctionsController::class,
-       'tx_funcwizards_webfunc' => \TYPO3\CMS\FuncWizards\Controller\WebFunctionWizardsBaseController::class,
+       'tx_funcwizards_webfunc' => \TYPO3\CMS\Compatibility6\Controller\WebFunctionWizardsBaseController::class,
+       'TYPO3\\CMS\\FuncWizards\\Controller\\WebFunctionWizardsBaseController' => \TYPO3\CMS\Compatibility6\Controller\WebFunctionWizardsBaseController::class,
        'tx_impexp_clickmenu' => \TYPO3\CMS\Impexp\Clickmenu::class,
        'SC_mod_tools_log_index' => \TYPO3\CMS\Impexp\Controller\ImportExportController::class,
        'tx_impexp' => \TYPO3\CMS\Impexp\ImportExport::class,
diff --git a/typo3/sysext/compatibility6/Resources/Private/Language/wizards.xlf b/typo3/sysext/compatibility6/Resources/Private/Language/wizards.xlf
new file mode 100644 (file)
index 0000000..e60f30e
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
+       <file t3:id="1415814826" source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:33Z" product-name="compatibility6">
+               <header/>
+               <body>
+                       <trans-unit id="wiz_lWizards" xml:space="preserve">
+                               <source>Select Wizard</source>
+                       </trans-unit>
+                       <trans-unit id="mod_wizards" xml:space="preserve">
+                               <source>Wizards</source>
+                       </trans-unit>
+               </body>
+       </file>
+</xliff>
diff --git a/typo3/sysext/compatibility6/Resources/Private/Language/wizards_csh.xlf b/typo3/sysext/compatibility6/Resources/Private/Language/wizards_csh.xlf
new file mode 100644 (file)
index 0000000..07d269f
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
+       <file t3:id="1415814827" source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:33Z" product-name="compatibility6">
+               <header/>
+               <body>
+                       <trans-unit id="tx_funcwizards.alttitle" xml:space="preserve">
+                               <source>Page Wizards</source>
+                       </trans-unit>
+                       <trans-unit id="tx_funcwizards.description" xml:space="preserve">
+                               <source>This submodule provides a framework where wizards can be added. Available wizards currently include a wizard for creating pages and sorting pages by title etc.</source>
+                       </trans-unit>
+                       <trans-unit id="_tx_funcwizards.seeAlso" xml:space="preserve">
+                               <source>_MOD_web_func:tx_wizardcrpages,
+_MOD_web_func:tx_wizardsortpages</source>
+                               <note from="developer">This string contains an internal text, which must not be changed. Just copy the original text into the translation field. For more information have a look at the Tutorial.</note>
+                       </trans-unit>
+               </body>
+       </file>
+</xliff>
diff --git a/typo3/sysext/compatibility6/ext_tables.php b/typo3/sysext/compatibility6/ext_tables.php
new file mode 100644 (file)
index 0000000..a0601bc
--- /dev/null
@@ -0,0 +1,12 @@
+<?php
+defined('TYPO3_MODE') or die();
+
+if (TYPO3_MODE === 'BE') {
+       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction(
+               'web_func',
+               \TYPO3\CMS\Compatibility6\Controller\WebFunctionWizardsBaseController::class,
+               NULL,
+               'LLL:EXT:compatibility6/Resources/Private/Language/wizards.xlf:mod_wizards'
+       );
+       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_web_func', 'EXT:compatibility6/Resources/Private/Language/wizards_csh.xlf');
+}
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-63687-WebFunctionsWizards-Moved.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-63687-WebFunctionsWizards-Moved.rst
new file mode 100644 (file)
index 0000000..dd282bd
--- /dev/null
@@ -0,0 +1,32 @@
+====================================================================
+Breaking: #63687 - Web=>Functions=>Wizards moved to legacy extension
+====================================================================
+
+Description
+===========
+
+Within the "Web" => "Functions" module there is a nested layer called "Wizards" where "Sort pages" and
+"Bulk-create new pages" resided until TYPO3 CMS 7.1. These are now moved directly underneath "Web" => "Functions",
+so the "Wizards" module function becomes obsolete, and with it the whole extension called "func_wizards" that provided
+this nested layer. The module function "Wizards" has been moved to the legacy extension "compatibility6". The
+extension "func_wizards" has been completely removed from the core.
+
+Impact
+======
+
+The existing "Functions" provided by the TYPO3 CMS Core are now directly dependant and hooked into "Web" => "Functions".
+Any extensions using "Web" => "Functions" => "Wizards" will not show up anymore.
+
+
+Affected installations
+======================
+
+TYPO3 CMS 7 installations need compatibility6 extension loaded if old extensions are still hook into
+"Web" => "Functions" => "Wizards".
+
+Migration
+=========
+
+Any extension hooking into "Web" => "Functions" => "Wizards" need to be adapted. In their ext_tables.php the
+"insertModuleFunciton" call does not need to have a 5th parameter given. The compatibility6 extension is then not
+needed anymore.
diff --git a/typo3/sysext/func_wizards/Classes/Controller/WebFunctionWizardsBaseController.php b/typo3/sysext/func_wizards/Classes/Controller/WebFunctionWizardsBaseController.php
deleted file mode 100644 (file)
index 9f7ace8..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-<?php
-namespace TYPO3\CMS\FuncWizards\Controller;
-
-/**
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * The Wizard function in the Web>Info module
- * Creates a framework for adding wizard sub-sub-modules under the Wizard function in Web>Info
- *
- * @author Kasper Skårhøj <kasperYYYY@typo3.com>
- */
-class WebFunctionWizardsBaseController extends \TYPO3\CMS\Backend\Module\AbstractFunctionModule {
-
-       /**
-        * @var string
-        */
-       public $function_key = 'wiz';
-
-       /**
-        * Initialize.
-        * Calls parent init function and then the handleExternalFunctionValue() function from the parent class
-        *
-        * @param object $pObj A reference to the parent (calling) object (which is probably an instance of an extension class to \TYPO3\CMS\Backend\Module\BaseScriptClass)
-        * @param array $conf The configuration set for this module - from global array TBE_MODULES_EXT
-        * @return void
-        */
-       public function init(&$pObj, $conf) {
-               // OK, handles ordinary init. This includes setting up the menu array with ->modMenu
-               parent::init($pObj, $conf);
-               // Making sure that any further external classes are added to the include_once array.
-               // Notice that inclusion happens twice in the main script because of this!!!
-               $this->handleExternalFunctionValue();
-       }
-
-       /**
-        * Modifies parent objects internal MOD_MENU array, adding items this module needs.
-        *
-        * @return array Items merged with the parent objects.
-        */
-       public function modMenu() {
-               $GLOBALS['LANG']->includeLLFile('EXT:func_wizards/locallang.xlf');
-               $modMenuAdd = array(
-                       $this->function_key => array()
-               );
-               $modMenuAdd[$this->function_key] = $this->pObj->mergeExternalItems($this->pObj->MCONF['name'], $this->function_key, $modMenuAdd[$this->function_key]);
-               $modMenuAdd[$this->function_key] = \TYPO3\CMS\Backend\Utility\BackendUtility::unsetMenuItems(
-                       $this->pObj->modTSconfig['properties'],
-                       $modMenuAdd[$this->function_key],
-                       'menu.' . $this->function_key
-               );
-               return $modMenuAdd;
-       }
-
-       /**
-        * Creation of the main content. Calling extObjContent() to trigger content generation from the sub-sub modules
-        *
-        * @return string The content
-        */
-       public function main() {
-               $menu = \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu(
-                       $this->pObj->id,
-                       'SET[wiz]',
-                       $this->pObj->MOD_SETTINGS['wiz'],
-                       $this->pObj->MOD_MENU['wiz']
-               );
-
-               $content = '';
-               if (!empty($menu)) {
-                       $menu = $GLOBALS['LANG']->getLL('wiz_lWizards', TRUE) . ': ' . $menu;
-                       $content = $this->pObj->doc->section('', '<span class="nobr">' . $menu . '</span>');
-                       $content .= $this->pObj->doc->spacer(20);
-               }
-
-               $content .= $this->extObjContent();
-               return $content;
-       }
-
-}
diff --git a/typo3/sysext/func_wizards/composer.json b/typo3/sysext/func_wizards/composer.json
deleted file mode 100644 (file)
index 2c8fd02..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-{
-       "name": "typo3/cms-func-wizards",
-       "type": "typo3-cms-framework",
-       "description": "TYPO3 Core",
-       "homepage": "http://typo3.org",
-       "license": ["GPL-2.0+"],
-       "version": "7.1.0",
-
-       "require": {
-               "typo3/cms-core": "*"
-       },
-       "replace": {
-               "func_wizards": "*"
-       },
-       "extra": {
-               "typo3/cms": {
-                       "Package": {
-                               "partOfFactoryDefault": true
-                       }
-               }
-       }
-}
diff --git a/typo3/sysext/func_wizards/ext_emconf.php b/typo3/sysext/func_wizards/ext_emconf.php
deleted file mode 100644 (file)
index 315458e..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-$EM_CONF[$_EXTKEY] = array(
-       'title' => 'Web>Func, Wizards',
-       'description' => 'Adds the \'Wizards\' item to the function menu in Web>Func. This is just a framework for wizard extensions.',
-       'category' => 'module',
-       'state' => 'stable',
-       'uploadfolder' => 0,
-       'createDirs' => '',
-       'clearCacheOnLoad' => 0,
-       'author' => 'Kasper Skaarhoj',
-       'author_email' => 'kasperYYYY@typo3.com',
-       'author_company' => 'Curby Soft Multimedia',
-       'version' => '7.1.0',
-       '_md5_values_when_last_written' => '',
-       'constraints' => array(
-               'depends' => array(
-                       'typo3' => '7.1.0-7.1.99',
-                       'func' => '7.1.0-7.1.99',
-               ),
-               'conflicts' => array(),
-               'suggests' => array(),
-       ),
-);
diff --git a/typo3/sysext/func_wizards/ext_icon.gif b/typo3/sysext/func_wizards/ext_icon.gif
deleted file mode 100644 (file)
index f439051..0000000
Binary files a/typo3/sysext/func_wizards/ext_icon.gif and /dev/null differ
diff --git a/typo3/sysext/func_wizards/ext_tables.php b/typo3/sysext/func_wizards/ext_tables.php
deleted file mode 100644 (file)
index a4f742f..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php
-defined('TYPO3_MODE') or die();
-
-if (TYPO3_MODE === 'BE') {
-       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction(
-               'web_func',
-               \TYPO3\CMS\FuncWizards\Controller\WebFunctionWizardsBaseController::class,
-               NULL,
-               'LLL:EXT:func_wizards/locallang.xlf:mod_wizards'
-       );
-       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_web_func', 'EXT:func_wizards/locallang_csh.xlf');
-}
diff --git a/typo3/sysext/func_wizards/locallang.xlf b/typo3/sysext/func_wizards/locallang.xlf
deleted file mode 100644 (file)
index 0e8e274..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
-       <file t3:id="1415814826" source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:33Z" product-name="func_wizards">
-               <header/>
-               <body>
-                       <trans-unit id="wiz_lWizards" xml:space="preserve">
-                               <source>Select Wizard</source>
-                       </trans-unit>
-                       <trans-unit id="mod_wizards" xml:space="preserve">
-                               <source>Wizards</source>
-                       </trans-unit>
-               </body>
-       </file>
-</xliff>
diff --git a/typo3/sysext/func_wizards/locallang_csh.xlf b/typo3/sysext/func_wizards/locallang_csh.xlf
deleted file mode 100644 (file)
index cbda2c6..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
-       <file t3:id="1415814827" source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:33Z" product-name="func_wizards">
-               <header/>
-               <body>
-                       <trans-unit id="tx_funcwizards.alttitle" xml:space="preserve">
-                               <source>Page Wizards</source>
-                       </trans-unit>
-                       <trans-unit id="tx_funcwizards.description" xml:space="preserve">
-                               <source>This submodule provides a framework where wizards can be added. Available wizards currently include a wizard for creating pages and sorting pages by title etc.</source>
-                       </trans-unit>
-                       <trans-unit id="_tx_funcwizards.seeAlso" xml:space="preserve">
-                               <source>_MOD_web_func:tx_wizardcrpages,
-_MOD_web_func:tx_wizardsortpages</source>
-                               <note from="developer">This string contains an internal text, which must not be changed. Just copy the original text into the translation field. For more information have a look at the Tutorial.</note>
-                       </trans-unit>
-               </body>
-       </file>
-</xliff>