[TASK] Use new way to register list wizard 41/27941/6
authorAlexander Schnitzler <typo3@alexanderschnitzler.de>
Fri, 28 Feb 2014 13:19:58 +0000 (14:19 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Fri, 28 Feb 2014 17:40:24 +0000 (18:40 +0100)
Resolves: #56434
Releases: 6.2
Change-Id: Ia776874ca247b11a769a1c17ee1e6ec65047ac4c
Reviewed-on: https://review.typo3.org/27941
Reviewed-by: Alexander Schnitzler
Tested-by: Alexander Schnitzler
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/backend/Modules/Wizards/ListWizard/conf.php [new file with mode: 0644]
typo3/sysext/backend/Modules/Wizards/ListWizard/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/wizard_list.php

diff --git a/typo3/sysext/backend/Modules/Wizards/ListWizard/conf.php b/typo3/sysext/backend/Modules/Wizards/ListWizard/conf.php
new file mode 100644 (file)
index 0000000..fe7de75
--- /dev/null
@@ -0,0 +1,6 @@
+<?php
+//required for mod.php
+$MCONF['name'] = 'wizard_list';
+$MCONF['script'] = '_DISPATCH';
+$MCONF['access'] = '';
+?>
diff --git a/typo3/sysext/backend/Modules/Wizards/ListWizard/index.php b/typo3/sysext/backend/Modules/Wizards/ListWizard/index.php
new file mode 100644 (file)
index 0000000..395ed5a
--- /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 list records from group/select lists in TCEforms
+ */
+$listController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\Wizard\\ListController');
+$listController->main();
index 61de7d7..5463d10 100644 (file)
@@ -15,4 +15,10 @@ if (TYPO3_MODE === 'BE') {
                'wizard_add',
                \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Modules/Wizards/AddWizard/'
        );
-}
+
+       // Register list wizard
+       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath(
+               'wizard_list',
+               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Modules/Wizards/ListWizard/'
+       );
+}
\ No newline at end of file
index ccd16d0..dda23ee 100644 (file)
@@ -101,7 +101,9 @@ return array(
                                                        'table' => 'sys_filemounts',
                                                        'pid' => '0'
                                                ),
-                                               'script' => 'wizard_list.php'
+                                               'module' => array(
+                                                       'name' => 'wizard_list'
+                                               )
                                        )
                                )
                        )
index 60be5aa..e1354ef 100644 (file)
@@ -97,7 +97,9 @@ return array(
                                                        'table' => 'be_groups',
                                                        'pid' => '0'
                                                ),
-                                               'script' => 'wizard_list.php'
+                                               'module' => array(
+                                                       'name' => 'wizard_list'
+                                               )
                                        )
                                )
                        )
@@ -173,7 +175,9 @@ return array(
                                                        'table' => 'sys_filemounts',
                                                        'pid' => '0'
                                                ),
-                                               'script' => 'wizard_list.php'
+                                               'module' => array(
+                                                       'name' => 'wizard_list'
+                                               )
                                        )
                                )
                        )
index e9110f9..010eece 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_list instead of script=wizard_list.php in your TCA. This
+script will be removed in two versions.');
 $listController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\Wizard\\ListController');
 $listController->main();