[TASK] Use new way to register add wizard 39/27939/3
authorAlexander Schnitzler <typo3@alexanderschnitzler.de>
Fri, 28 Feb 2014 12:53:51 +0000 (13:53 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Fri, 28 Feb 2014 13:47:58 +0000 (14:47 +0100)
Resolves: #56432
Releases: 6.2
Change-Id: Id78b3182ed6710a09a82ce69bd1f5b72f9e2a3e0
Reviewed-on: https://review.typo3.org/27939
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/backend/Modules/Wizards/AddWizard/conf.php [new file with mode: 0644]
typo3/sysext/backend/Modules/Wizards/AddWizard/index.php [new file with mode: 0644]
typo3/sysext/backend/ext_tables.php
typo3/sysext/core/Configuration/TCA/be_groups.php
typo3/sysext/core/Configuration/TCA/be_users.php
typo3/sysext/frontend/Configuration/TCA/sys_template.php
typo3/wizard_add.php

diff --git a/typo3/sysext/backend/Modules/Wizards/AddWizard/conf.php b/typo3/sysext/backend/Modules/Wizards/AddWizard/conf.php
new file mode 100644 (file)
index 0000000..6ef3db5
--- /dev/null
@@ -0,0 +1,6 @@
+<?php
+//required for mod.php
+$MCONF['name'] = 'wizard_add';
+$MCONF['script'] = '_DISPATCH';
+$MCONF['access'] = '';
+?>
diff --git a/typo3/sysext/backend/Modules/Wizards/AddWizard/index.php b/typo3/sysext/backend/Modules/Wizards/AddWizard/index.php
new file mode 100644 (file)
index 0000000..cc29fd3
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2014 Alexander Schnitzler (typo3@alexanderschnitzler.de)
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the text file GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Wizard to add records from group/select lists in TCEforms
+ */
+$editController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\Wizard\\AddController');
+$editController->main();
index 1499c03..61de7d7 100644 (file)
@@ -9,4 +9,10 @@ if (TYPO3_MODE === 'BE') {
                'wizard_edit',
                \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Modules/Wizards/EditWizard/'
        );
+
+       // Register add wizard
+       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath(
+               'wizard_add',
+               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Modules/Wizards/AddWizard/'
+       );
 }
index f4c8b46..ccd16d0 100644 (file)
@@ -89,7 +89,9 @@ return array(
                                                        'pid' => '0',
                                                        'setValue' => 'prepend'
                                                ),
-                                               'script' => 'wizard_add.php'
+                                               'module' => array(
+                                                       'name' => 'wizard_add'
+                                               )
                                        ),
                                        'list' => array(
                                                'type' => 'script',
index ab0a047..60be5aa 100644 (file)
@@ -85,7 +85,9 @@ return array(
                                                        'pid' => '0',
                                                        'setValue' => 'prepend'
                                                ),
-                                               'script' => 'wizard_add.php'
+                                               'module' => array(
+                                                       'name' => 'wizard_add'
+                                               )
                                        ),
                                        'list' => array(
                                                'type' => 'script',
@@ -159,7 +161,9 @@ return array(
                                                        'pid' => '0',
                                                        'setValue' => 'prepend'
                                                ),
-                                               'script' => 'wizard_add.php'
+                                               'module' => array(
+                                                       'name' => 'wizard_add'
+                                               )
                                        ),
                                        'list' => array(
                                                'type' => 'script',
index 7ddb5bf..a5774e2 100644 (file)
@@ -177,7 +177,9 @@ return array(
                                                        'pid' => '###CURRENT_PID###',
                                                        'setValue' => 'prepend'
                                                ),
-                                               'script' => 'wizard_add.php'
+                                               'module' => array(
+                                                       'name' => 'wizard_add'
+                                               )
                                        )
                                )
                        )
index d76be08..e3ebb4f 100644 (file)
@@ -32,5 +32,8 @@
  */
 require __DIR__ . '/init.php';
 
+\TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('The way registering a wizard in TCA has chan
+ged in 6.2. Please set module[name]=wizard_add instead of script=wizard_add.php in your TCA. This
+script will be removed in two versions.');
 $addController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\Wizard\\AddController');
 $addController->main();