[TASK] Integrate "Functions" as context menu 77/53377/8
authorChristian Kuhn <lolli@schwarzbu.ch>
Sun, 2 Jul 2017 04:47:16 +0000 (06:47 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 3 Jul 2017 13:54:01 +0000 (15:54 +0200)
The patch integrates ext:wizard_sortpages and ext:wizard_crpages
as context menu items in "more" of the page record context menus
and gets rid of the two default "Functions" main module entries,
effectively obsoleting ext:func, which will be extracted to TER
for b/w compat in a second step.

* Isolate ext:func by moving its language xml from ext:lang to ext:func
* Routing configuration for "sort pages" and "create pages" in ext:backend
* Context menu handling for "sort pages" and "create pages" in ext:backend
* Free "sort pages" and "create pages" from dependency to ext:frontend
  by not calling PageRepository->getMenu() anymore
* Proper use of request/response instead of _GP access
* Better controller / view separation

Change-Id: I2c7acbb79ddd8404fbef69a1c126d250b976629b
Resolves: #81768
Releases: master
Reviewed-on: https://review.typo3.org/53377
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
57 files changed:
Build/tsconfig.json
composer.json
composer.lock
typo3/sysext/backend/Classes/ContextMenu/ItemProviders/PageProvider.php
typo3/sysext/backend/Classes/Controller/Page/NewMultiplePagesController.php [new file with mode: 0644]
typo3/sysext/backend/Classes/Controller/Page/SortSubPagesController.php [new file with mode: 0644]
typo3/sysext/backend/Classes/Module/AbstractFunctionModule.php
typo3/sysext/backend/Classes/ViewHelpers/ModuleLinkViewHelper.php [new file with mode: 0644]
typo3/sysext/backend/Configuration/Backend/Routes.php
typo3/sysext/backend/Resources/Private/Language/locallang_pages_new.xlf [new file with mode: 0644]
typo3/sysext/backend/Resources/Private/Language/locallang_pages_new_csh.xlf [new file with mode: 0644]
typo3/sysext/backend/Resources/Private/Language/locallang_pages_sort.xlf [new file with mode: 0644]
typo3/sysext/backend/Resources/Private/Language/locallang_pages_sort_csh.xlf [new file with mode: 0644]
typo3/sysext/backend/Resources/Private/Templates/Page/NewPages.html [new file with mode: 0644]
typo3/sysext/backend/Resources/Private/Templates/Page/SortSubPages.html [new file with mode: 0644]
typo3/sysext/backend/Resources/Public/Images/Csh/PagesNew_1.png [new file with mode: 0644]
typo3/sysext/backend/Resources/Public/Images/Csh/PagesNew_2.png [new file with mode: 0644]
typo3/sysext/backend/Resources/Public/Images/Csh/PagesSort.png [new file with mode: 0644]
typo3/sysext/backend/Resources/Public/JavaScript/ContextMenuActions.js
typo3/sysext/backend/Resources/Public/JavaScript/NewMultiplePages.js [new file with mode: 0644]
typo3/sysext/backend/ext_tables.php
typo3/sysext/core/Documentation/Changelog/8.5/Deprecation-78647-MoveLanguageFilesFromEXTlanglocallang_ToResourcesPrivateLanguage.rst
typo3/sysext/core/Documentation/Changelog/master/Important-81768-CreatePagesAndSortPagesInContextMenu.rst [new file with mode: 0644]
typo3/sysext/core/ext_tables.php
typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Resources/Private/Language/locallang_csh.xml
typo3/sysext/frontend/Classes/Page/PageRepository.php
typo3/sysext/func/Classes/Controller/PageFunctionsController.php
typo3/sysext/func/Resources/Private/Language/locallang_csh_web_func.xlf [new file with mode: 0644]
typo3/sysext/func/Resources/Private/Language/locallang_mod_web_func.xlf [new file with mode: 0644]
typo3/sysext/func/Resources/Public/Images/Csh/pagetree_overview_11.png [new file with mode: 0644]
typo3/sysext/func/ext_tables.php
typo3/sysext/lang/Resources/Private/Language/locallang_csh_web_func.xlf [deleted file]
typo3/sysext/lang/Resources/Private/Language/locallang_csh_web_info.xlf
typo3/sysext/lang/Resources/Private/Language/locallang_mod_web_func.xlf [deleted file]
typo3/sysext/lang/Resources/Public/Images/cshimages/pagetree_overview_11.png [deleted file]
typo3/sysext/wizard_crpages/Classes/Controller/CreatePagesWizardModuleFunctionController.php [deleted file]
typo3/sysext/wizard_crpages/LICENSE.txt [deleted file]
typo3/sysext/wizard_crpages/Resources/Private/Language/locallang.xlf [deleted file]
typo3/sysext/wizard_crpages/Resources/Private/Language/locallang_csh.xlf [deleted file]
typo3/sysext/wizard_crpages/Resources/Private/Templates/CreatePagesWizard.html [deleted file]
typo3/sysext/wizard_crpages/Resources/Public/Icons/Extension.png [deleted file]
typo3/sysext/wizard_crpages/Resources/Public/Images/cshimages/wizards_1.png [deleted file]
typo3/sysext/wizard_crpages/Resources/Public/Images/cshimages/wizards_2.png [deleted file]
typo3/sysext/wizard_crpages/Resources/Public/JavaScript/WizardCreatePages.js [deleted file]
typo3/sysext/wizard_crpages/composer.json [deleted file]
typo3/sysext/wizard_crpages/ext_emconf.php [deleted file]
typo3/sysext/wizard_crpages/ext_tables.php [deleted file]
typo3/sysext/wizard_sortpages/Classes/View/SortPagesWizardModuleFunction.php [deleted file]
typo3/sysext/wizard_sortpages/LICENSE.txt [deleted file]
typo3/sysext/wizard_sortpages/Resources/Private/Language/locallang.xlf [deleted file]
typo3/sysext/wizard_sortpages/Resources/Private/Language/locallang_csh.xlf [deleted file]
typo3/sysext/wizard_sortpages/Resources/Private/Templates/SortPagesWizard.html [deleted file]
typo3/sysext/wizard_sortpages/Resources/Public/Icons/Extension.png [deleted file]
typo3/sysext/wizard_sortpages/Resources/Public/Images/cshimages/wizards_1.png [deleted file]
typo3/sysext/wizard_sortpages/composer.json [deleted file]
typo3/sysext/wizard_sortpages/ext_emconf.php [deleted file]
typo3/sysext/wizard_sortpages/ext_tables.php [deleted file]

index ae64157..b71c7a2 100644 (file)
                 "../typo3/sysext/viewpage/Resources/Public/JavaScript/*",
                 "../typo3/sysext/viewpage/Resources/Private/TypeScript/*"
             ],
-            "TYPO3/CMS/WizardCrpages/*": [
-                "../typo3/sysext/wizard_crpages/Resources/Public/JavaScript/*",
-                "../typo3/sysext/wizard_crpages/Resources/Private/TypeScript/*"
-            ],
             "TYPO3/CMS/Workspaces/*": [
                 "../typo3/sysext/workspaces/Resources/Public/JavaScript/*",
                 "../typo3/sysext/workspaces/Resources/Private/TypeScript/*"
         "../typo3/sysext/*/Resources/Private/TypeScript/**/*.ts",
         "../typo3/sysext/*/Tests/TypeScript/**/*.ts"
     ]
-}
\ No newline at end of file
+}
index 1cbd008..f615e63 100644 (file)
                "typo3/cms-typo3db-legacy": "self.version",
                "typo3/cms-version": "self.version",
                "typo3/cms-viewpage": "self.version",
-               "typo3/cms-wizard-crpages": "self.version",
-               "typo3/cms-wizard-sortpages": "self.version",
                "typo3/cms-workspaces": "self.version"
        },
        "autoload": {
                        "TYPO3\\CMS\\Tstemplate\\": "typo3/sysext/tstemplate/Classes/",
                        "TYPO3\\CMS\\Version\\": "typo3/sysext/version/Classes/",
                        "TYPO3\\CMS\\Viewpage\\": "typo3/sysext/viewpage/Classes/",
-                       "TYPO3\\CMS\\WizardCrpages\\": "typo3/sysext/wizard_crpages/Classes/",
-                       "TYPO3\\CMS\\WizardSortpages\\": "typo3/sysext/wizard_sortpages/Classes/",
                        "TYPO3\\CMS\\Workspaces\\": "typo3/sysext/workspaces/Classes/"
                },
                "classmap": [
index 2cb1911..989b1ce 100644 (file)
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
         "This file is @generated automatically"
     ],
-    "content-hash": "546e2c9d87c42a0c785bb55ec036056a",
+    "content-hash": "ba4bebe7fcec50b689f276105864ae12",
     "packages": [
         {
             "name": "cogpowered/finediff",
index 73bcd6b..c09975d 100644 (file)
@@ -15,6 +15,7 @@ namespace TYPO3\CMS\Backend\ContextMenu\ItemProviders;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Type\Bitmask\Permission;
 
 /**
@@ -98,6 +99,16 @@ class PageProvider extends RecordProvider
                     'iconIdentifier' => 'actions-page-new',
                     'callbackAction' => 'newPageWizard',
                 ],
+                'pagesSort' => [
+                    'label' => 'LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort.xlf:title',
+                    'iconIdentifier' => 'actions-page-move',
+                    'callbackAction' => 'pagesSort',
+                ],
+                'pagesNewMultiple' => [
+                    'label' => 'LLL:EXT:backend/Resources/Private/Language/locallang_pages_new.xlf:title',
+                    'iconIdentifier' => 'apps-pagetree-drag-move-between',
+                    'callbackAction' => 'pagesNewMultiple',
+                ],
                 'openListModule' => [
                     'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_misc.xlf:CM_db_list',
                     'iconIdentifier' => 'actions-system-list-open',
@@ -181,6 +192,7 @@ class PageProvider extends RecordProvider
                 break;
             case 'new':
             case 'newWizard':
+            case 'pagesNewMultiple':
                 $canRender = $this->canBeCreated();
                 break;
             case 'info':
@@ -201,6 +213,9 @@ class PageProvider extends RecordProvider
             case 'openListModule':
                 $canRender = $this->canOpenListModule();
                 break;
+            case 'pagesSort':
+                $canRender = $this->canBeSorted();
+                break;
             case 'mountAsTreeRoot':
                 $canRender = !$this->isRoot();
                 break;
@@ -333,6 +348,19 @@ class PageProvider extends RecordProvider
     }
 
     /**
+     * Check if sub pages of given page can be sorted
+     *
+     * @return bool
+     */
+    protected function canBeSorted(): bool
+    {
+        return $this->backendUser->check('tables_modify', $this->table)
+            && $this->hasPagePermission(Permission::CONTENT_EDIT)
+            && !$this->isDeletePlaceholder()
+            && $this->backendUser->workspace === 0;
+    }
+
+    /**
      * Checks if the page is allowed to be removed
      *
      * @return bool
@@ -424,6 +452,16 @@ class PageProvider extends RecordProvider
         if ($itemName === 'pasteAfter') {
             $attributes += $this->getPasteAdditionalAttributes('after');
         }
+        if ($itemName === 'pagesSort') {
+            $attributes += [
+                'data-pages-sort-url' => BackendUtility::getModuleUrl('pages_sort', ['id' => $this->record['uid']]),
+            ];
+        }
+        if ($itemName === 'pagesNewMultiple') {
+            $attributes += [
+                'data-pages-new-multiple-url' => BackendUtility::getModuleUrl('pages_new', ['id' => $this->record['uid']]),
+            ];
+        }
         return $attributes;
     }
 
diff --git a/typo3/sysext/backend/Classes/Controller/Page/NewMultiplePagesController.php b/typo3/sysext/backend/Classes/Controller/Page/NewMultiplePagesController.php
new file mode 100644 (file)
index 0000000..8fcb109
--- /dev/null
@@ -0,0 +1,289 @@
+<?php
+declare(strict_types=1);
+namespace TYPO3\CMS\Backend\Controller\Page;
+
+/*
+ * 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!
+ */
+
+use Psr\Http\Message\ResponseInterface;
+use Psr\Http\Message\ServerRequestInterface;
+use TYPO3\CMS\Backend\Template\ModuleTemplate;
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
+use TYPO3\CMS\Core\Database\ConnectionPool;
+use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
+use TYPO3\CMS\Core\DataHandling\DataHandler;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
+use TYPO3\CMS\Core\Localization\LanguageService;
+use TYPO3\CMS\Core\Type\Bitmask\Permission;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Core\Utility\MathUtility;
+use TYPO3\CMS\Fluid\View\StandaloneView;
+
+/**
+ * "Create multiple pages" controller
+ */
+class NewMultiplePagesController
+{
+    /**
+     * ModuleTemplate object
+     *
+     * @var ModuleTemplate
+     */
+    protected $moduleTemplate;
+
+    /**
+     * Constructor Method
+     *
+     * @var $moduleTemplate ModuleTemplate
+     */
+    public function __construct(ModuleTemplate $moduleTemplate = null)
+    {
+        $this->moduleTemplate = $moduleTemplate ?? GeneralUtility::makeInstance(ModuleTemplate::class);
+    }
+
+    /**
+     * Main function Handling input variables and rendering main view
+     *
+     * @param $request ServerRequestInterface
+     * @param $response ResponseInterface
+     * @return ResponseInterface Response
+     */
+    public function mainAction(ServerRequestInterface $request, ResponseInterface $response): ResponseInterface
+    {
+        $backendUser = $this->getBackendUser();
+        $pageUid = (int)$request->getQueryParams()['id'];
+
+        // Show only if there is a valid page and if this page may be viewed by the user
+        $pageRecord = BackendUtility::readPageAccess($pageUid, $backendUser->getPagePermsClause(Permission::PAGE_SHOW));
+        if (!is_array($pageRecord)) {
+            // User has no permission on parent page, should not happen, just render an empty page
+            $this->moduleTemplate->setContent('');
+            $response->getBody()->write($this->moduleTemplate->renderContent());
+            return $response;
+        }
+
+        // Doc header handling
+        $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+        $this->moduleTemplate->getDocHeaderComponent()->setMetaInformation($pageRecord);
+        $buttonBar = $this->moduleTemplate->getDocHeaderComponent()->getButtonBar();
+        $cshButton = $buttonBar->makeHelpButton()
+            ->setModuleName('pages_new')
+            ->setFieldName('pages_new');
+        $viewButton = $buttonBar->makeLinkButton()
+            ->setOnClick(BackendUtility::viewOnClick($pageUid, '', BackendUtility::BEgetRootLine($pageUid)))
+            ->setTitle($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.showPage'))
+            ->setIcon($iconFactory->getIcon('actions-view-page', Icon::SIZE_SMALL))
+            ->setHref('#');
+        $shortcutButton = $buttonBar->makeShortcutButton()
+            ->setModuleName('pages_new')
+            ->setGetVariables(['id']);
+        $buttonBar->addButton($cshButton)->addButton($viewButton)->addButton($shortcutButton);
+
+        // Main view setup
+        $view = GeneralUtility::makeInstance(StandaloneView::class);
+        $view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName(
+            'EXT:backend/Resources/Private/Templates/Page/NewPages.html'
+        ));
+
+        $calculatedPermissions = $backendUser->calcPerms($pageRecord);
+        $canCreateNew = $backendUser->isAdmin() || $calculatedPermissions & Permission::PAGE_NEW;
+
+        $view->assign('canCreateNew', $canCreateNew);
+        $view->assign('maxTitleLength', $backendUser->uc['titleLen'] ?? 20);
+        $view->assign('pageUid', $pageUid);
+
+        if ($canCreateNew) {
+            $newPagesData = (array)$request->getParsedBody()['pages'];
+            if (!empty($newPagesData)) {
+                $hasNewPagesData = true;
+                $afterExisting = isset($request->getParsedBody()['createInListEnd']);
+                $hidePages = isset($request->getParsedBody()['hidePages']);
+                $hidePagesInMenu = isset($request->getParsedBody()['hidePagesInMenus']);
+                $pagesCreated = $this->createPages($newPagesData, $pageUid, $afterExisting, $hidePages, $hidePagesInMenu);
+                $view->assign('pagesCreated', $pagesCreated);
+                $subPages = $this->getSubPagesOfPage($pageUid);
+                $visiblePages = [];
+                foreach ($subPages as $page) {
+                    $calculatedPermissions = $backendUser->calcPerms($page);
+                    if ($backendUser->isAdmin() || $calculatedPermissions & Permission::PAGE_SHOW) {
+                        $visiblePages[] = $page;
+                    }
+                }
+                $view->assign('visiblePages', $visiblePages);
+            } else {
+                $hasNewPagesData = false;
+                $view->assign('pageTypes', $this->getTypeSelectData($pageUid));
+            }
+            $view->assign('hasNewPagesData', $hasNewPagesData);
+        }
+
+        $this->moduleTemplate->setContent($view->render());
+        $response->getBody()->write($this->moduleTemplate->renderContent());
+        return $response;
+    }
+
+    /**
+     * Persist new pages in DB
+     *
+     * @param array $newPagesData Data array with title and page type
+     * @param int $pageUid Uid of page new pages should be added in
+     * @param bool $afterExisting True if new pages should be created after existing pages
+     * @param bool $hidePages True if new pages should be set to hidden
+     * @param bool $hidePagesInMenu True if new pages should be set to hidden in menu
+     * @return bool TRUE if at least on pages has been added
+     */
+    protected function createPages(array $newPagesData, int $pageUid, bool $afterExisting, bool $hidePages, bool $hidePagesInMenu): bool
+    {
+        $pagesCreated = false;
+
+        // Set first pid to "-1 * uid of last existing sub page" if pages should be created at end
+        $firstPid = $pageUid;
+        if ($afterExisting) {
+            $subPages = $this->getSubPagesOfPage($pageUid);
+            $lastPage = end($subPages);
+            if (isset($lastPage['uid']) && MathUtility::canBeInterpretedAsInteger($lastPage['uid'])) {
+                $firstPid = -(int)($lastPage['uid']);
+            }
+        }
+
+        $commandArray = [];
+        $firstRecord = true;
+        $previousIdentifier = '';
+        foreach ($newPagesData as $identifier => $data) {
+            if (!trim($data['title'])) {
+                continue;
+            } else {
+                $commandArray['pages'][$identifier]['hidden'] = $hidePages;
+                $commandArray['pages'][$identifier]['nav_hide'] = $hidePagesInMenu;
+                $commandArray['pages'][$identifier]['title'] = $data['title'];
+                $commandArray['pages'][$identifier]['doktype'] = $data['doktype'];
+                if ($firstRecord) {
+                    $firstRecord = false;
+                    $commandArray['pages'][$identifier]['pid'] = $firstPid;
+                } else {
+                    $commandArray['pages'][$identifier]['pid'] = '-' . $previousIdentifier;
+                }
+                $previousIdentifier = $identifier;
+            }
+        }
+
+        if (!empty($commandArray)) {
+            $pagesCreated = true;
+            $dataHandler = GeneralUtility::makeInstance(DataHandler::class);
+            // Set default TCA values specific for the user
+            $backendUser = $this->getBackendUser();
+            $tcaDefaultOverride = $backendUser->getTSConfigProp('TCAdefaults');
+            if (is_array($tcaDefaultOverride)) {
+                $dataHandler->setDefaultsFromUserTS($tcaDefaultOverride);
+            }
+            $dataHandler->start($commandArray, []);
+            $dataHandler->process_datamap();
+            BackendUtility::setUpdateSignal('updatePageTree');
+        }
+
+        return $pagesCreated;
+    }
+
+    /**
+     * Page selector type data
+     *
+     * @param int $pageUid Page Uid
+     * @return array
+     */
+    protected function getTypeSelectData(int $pageUid)
+    {
+        $tsConfig = BackendUtility::getPagesTSconfig($pageUid);
+        $pagesTsConfig = $tsConfig['TCEFORM.']['pages.'] ?? [];
+
+        // Find all available doktypes for the current user
+        $types = $GLOBALS['PAGES_TYPES'];
+        unset($types['default']);
+        $types = array_keys($types);
+        $types[] = 1; // default
+        $types[] = 3; // link
+        $types[] = 4; // shortcut
+        $types[] = 7; // mount point
+        $types[] = 199; // spacer
+
+        if (!$this->getBackendUser()->isAdmin() && isset($this->getBackendUser()->groupData['pagetypes_select'])) {
+            $types = GeneralUtility::trimExplode(',', $this->getBackendUser()->groupData['pagetypes_select'], true);
+        }
+        $removeItems = isset($pagesTsConfig['doktype.']['removeItems']) ? GeneralUtility::trimExplode(',', $pagesTsConfig['doktype.']['removeItems'], true) : [];
+        $allowedDoktypes = array_diff($types, $removeItems);
+
+        // All doktypes in the TCA
+        $availableDoktypes = $GLOBALS['TCA']['pages']['columns']['doktype']['config']['items'];
+
+        // Sort by group and allowedDoktypes
+        $groupedData = [];
+        $groupLabel = '';
+        foreach ($availableDoktypes as $doktypeData) {
+            // If it is a group, save the group label for the children underneath
+            if ($doktypeData[1] === '--div--') {
+                $groupLabel = $doktypeData[0];
+            } else {
+                if (in_array($doktypeData[1], $allowedDoktypes)) {
+                    $groupedData[$groupLabel][] = $doktypeData;
+                }
+            }
+        }
+
+        return $groupedData;
+    }
+
+    /**
+     * Get a list of sub pages with some all fields from given page.
+     * Fetch all data fields for full page icon display
+     *
+     * @param int $pageUid Get sub pages from this pages
+     * @return array
+     */
+    protected function getSubPagesOfPage(int $pageUid): array
+    {
+        $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('pages');
+        $queryBuilder->getRestrictions()->removeAll()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
+        return $queryBuilder->select('*')
+            ->from('pages')
+            ->where(
+                $queryBuilder->expr()->eq(
+                    'pid',
+                    $queryBuilder->createNamedParameter($pageUid, \PDO::PARAM_INT)
+                )
+            )
+            ->orderBy('sorting')
+            ->execute()
+            ->fetchAll();
+    }
+
+    /**
+     * Returns LanguageService
+     *
+     * @return LanguageService
+     */
+    protected function getLanguageService()
+    {
+        return $GLOBALS['LANG'];
+    }
+
+    /**
+     * Returns current BE user
+     *
+     * @return BackendUserAuthentication
+     */
+    protected function getBackendUser()
+    {
+        return $GLOBALS['BE_USER'];
+    }
+}
diff --git a/typo3/sysext/backend/Classes/Controller/Page/SortSubPagesController.php b/typo3/sysext/backend/Classes/Controller/Page/SortSubPagesController.php
new file mode 100644 (file)
index 0000000..a7cf7e6
--- /dev/null
@@ -0,0 +1,237 @@
+<?php
+declare(strict_types=1);
+namespace TYPO3\CMS\Backend\Controller\Page;
+
+/*
+ * 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!
+ */
+
+use Psr\Http\Message\ResponseInterface;
+use Psr\Http\Message\ServerRequestInterface;
+use TYPO3\CMS\Backend\Template\ModuleTemplate;
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
+use TYPO3\CMS\Core\Database\ConnectionPool;
+use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
+use TYPO3\CMS\Core\DataHandling\DataHandler;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
+use TYPO3\CMS\Core\Localization\LanguageService;
+use TYPO3\CMS\Core\Type\Bitmask\Permission;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Fluid\View\StandaloneView;
+
+/**
+ * "Sort sub pages" controller - reachable from context menu "more" on page records
+ */
+class SortSubPagesController
+{
+    /**
+     * ModuleTemplate object
+     *
+     * @var ModuleTemplate
+     */
+    protected $moduleTemplate;
+
+    /**
+     * Constructor Method
+     *
+     * @var $moduleTemplate ModuleTemplate
+     */
+    public function __construct(ModuleTemplate $moduleTemplate = null)
+    {
+        $this->moduleTemplate = $moduleTemplate ?? GeneralUtility::makeInstance(ModuleTemplate::class);
+    }
+
+    /**
+     * Main function Handling input variables and rendering main view
+     *
+     * @param $request ServerRequestInterface
+     * @param $response ResponseInterface
+     * @return ResponseInterface Response
+     */
+    public function mainAction(ServerRequestInterface $request, ResponseInterface $response): ResponseInterface
+    {
+        $backendUser = $this->getBackendUser();
+        $parentPageUid = (int)$request->getQueryParams()['id'];
+
+        // Show only if there is a valid page and if this page may be viewed by the user
+        $pageInformation = BackendUtility::readPageAccess($parentPageUid, $backendUser->getPagePermsClause(Permission::PAGE_SHOW));
+        if (!is_array($pageInformation)) {
+            // User has no permission on parent page, should not happen, just render an empty page
+            $this->moduleTemplate->setContent('');
+            $response->getBody()->write($this->moduleTemplate->renderContent());
+            return $response;
+        }
+
+        // Doc header handling
+        $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+        $this->moduleTemplate->getDocHeaderComponent()->setMetaInformation($pageInformation);
+        $buttonBar = $this->moduleTemplate->getDocHeaderComponent()->getButtonBar();
+        $cshButton = $buttonBar->makeHelpButton()
+            ->setModuleName('pages_sort')
+            ->setFieldName('pages_sort');
+        $viewButton = $buttonBar->makeLinkButton()
+            ->setOnClick(BackendUtility::viewOnClick($parentPageUid, '', BackendUtility::BEgetRootLine($parentPageUid)))
+            ->setTitle($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.showPage'))
+            ->setIcon($iconFactory->getIcon('actions-view-page', Icon::SIZE_SMALL))
+            ->setHref('#');
+        $shortcutButton = $buttonBar->makeShortcutButton()
+            ->setModuleName('pages_sort')
+            ->setGetVariables(['id']);
+        $buttonBar->addButton($cshButton)->addButton($viewButton)->addButton($shortcutButton);
+
+        // Main view setup
+        $view = GeneralUtility::makeInstance(StandaloneView::class);
+        $view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName(
+            'EXT:backend/Resources/Private/Templates/Page/SortSubPages.html'
+        ));
+
+        $isInWorkspace = $backendUser->workspace !== 0;
+        $view->assign('isInWorkspace', $isInWorkspace);
+        $view->assign('maxTitleLength', $backendUser->uc['titleLen'] ?? 20);
+        $view->assign('parentPageUid', $parentPageUid);
+        $view->assign('dateFormat', $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy']);
+        $view->assign('timeFormat', $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm']);
+
+        if (!$isInWorkspace) {
+            // Apply new sorting if given
+            $newSortBy = $request->getQueryParams()['newSortBy'] ?? null;
+            if ($newSortBy && in_array($newSortBy, ['title', 'subtitle', 'crdate', 'tstamp'], true)) {
+                $this->sortSubPagesByField($parentPageUid, (string)$newSortBy);
+            } elseif ($newSortBy && $newSortBy === 'reverseCurrentSorting') {
+                $this->reverseSortingOfPages($parentPageUid);
+            }
+
+            // Get sub pages, loop through them and add page/user specific permission details
+            $pageRecords = $this->getSubPagesOfPage($parentPageUid);
+            $hasInvisiblePage = false;
+            $subPages = [];
+            foreach ($pageRecords as $page) {
+                $pageWithPermissions = [];
+                $pageWithPermissions['record'] = $page;
+                $calculatedPermissions = $backendUser->calcPerms($page);
+                $pageWithPermissions['canEdit'] = $backendUser->isAdmin() || $calculatedPermissions & Permission::PAGE_EDIT;
+                $canSeePage = $backendUser->isAdmin() || $calculatedPermissions & Permission::PAGE_SHOW;
+                if ($canSeePage) {
+                    $subPages[] = $pageWithPermissions;
+                } else {
+                    $hasInvisiblePage = true;
+                }
+            }
+            $view->assign('subPages', $subPages);
+            $view->assign('hasInvisiblePage', $hasInvisiblePage);
+        }
+
+        $this->moduleTemplate->setContent($view->render());
+        $response->getBody()->write($this->moduleTemplate->renderContent());
+        return $response;
+    }
+
+    /**
+     * Sort sub pages of given uid by field name alphabetically
+     *
+     * @param int $parentPageUid Parent page uid
+     * @param string $newSortBy Field name to sort by
+     * @throws \RuntimeException If $newSortBy does not validate
+     */
+    protected function sortSubPagesByField(int $parentPageUid, string $newSortBy)
+    {
+        if (!in_array($newSortBy, ['title', 'subtitle', 'crdate', 'tstamp'], true)) {
+            throw new \RuntimeException(
+                'New sort by must be one of "title", "subtitle", "crdate" or tstamp',
+                1498924810
+            );
+        }
+        $subPages = $this->getSubPagesOfPage($parentPageUid, $newSortBy);
+        if (!empty($subPages)) {
+            $subPages = array_reverse($subPages);
+            $this->persistNewSubPageOrder($parentPageUid, $subPages);
+        }
+    }
+
+    /**
+     * Reverse current sorting of sub pages
+     *
+     * @param int $parentPageUid Parent page uid
+     */
+    protected function reverseSortingOfPages(int $parentPageUid)
+    {
+        $subPages = $this->getSubPagesOfPage($parentPageUid);
+        if (!empty($subPages)) {
+            $this->persistNewSubPageOrder($parentPageUid, $subPages);
+        }
+    }
+
+    /**
+     * Store new sub page order
+     *
+     * @param int $parentPageUid Parent page uid
+     * @param array $subPages List of sub pages in new order
+     */
+    protected function persistNewSubPageOrder(int $parentPageUid, array $subPages)
+    {
+        $commandArray = [];
+        foreach ($subPages as $subPage) {
+            $commandArray['pages'][$subPage['uid']]['move'] = $parentPageUid;
+        }
+        $dataHandler = GeneralUtility::makeInstance(DataHandler::class);
+        $dataHandler->start([], $commandArray);
+        $dataHandler->process_cmdmap();
+        BackendUtility::setUpdateSignal('updatePageTree');
+    }
+
+    /**
+     * Get a list of sub pages with some all fields from given page.
+     * Fetch all data fields for full page icon display
+     *
+     * @param int $parentPageUid Get sub pages from this pages
+     * @param string $orderBy Order pages by this field
+     * @return array
+     */
+    protected function getSubPagesOfPage(int $parentPageUid, string $orderBy = 'sorting'): array
+    {
+        $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('pages');
+        $queryBuilder->getRestrictions()->removeAll()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
+        return $queryBuilder->select('*')
+            ->from('pages')
+            ->where(
+                $queryBuilder->expr()->eq(
+                    'pid',
+                    $queryBuilder->createNamedParameter($parentPageUid, \PDO::PARAM_INT)
+                )
+            )
+            ->orderBy($orderBy)
+            ->execute()
+            ->fetchAll();
+    }
+
+    /**
+     * Returns LanguageService
+     *
+     * @return LanguageService
+     */
+    protected function getLanguageService()
+    {
+        return $GLOBALS['LANG'];
+    }
+
+    /**
+     * Returns current BE user
+     *
+     * @return BackendUserAuthentication
+     */
+    protected function getBackendUser()
+    {
+        return $GLOBALS['BE_USER'];
+    }
+}
index 0e57551..3bf9ec8 100644 (file)
@@ -32,7 +32,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
  * In other words this class is used for backend modules which is not true
  * backend modules appearing in the menu but rather adds themselves as a new
  * entry in the function menu which typically exists for a backend
- * module (like Web>Functions, Web>Info or Tools etc...)
+ * module (like Web>Info or Tools etc...)
  * The magic that binds this together is stored in the global variable
  * $TBE_MODULES_EXT where extensions wanting to connect a module based on
  * this class to an existing backend module store configuration which consists
@@ -41,8 +41,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
  * For more information about this, please see the large example comment for the
  * class \TYPO3\CMS\Backend\Module\BaseScriptClass. This will show the principle of a
  * 'level-1' connection. The more advanced example - having two layers as it is done
- * by the 'func_wizards' extension with the 'web_info' module - can be seen in the
- * comment above.
+ * with the 'web_info' module - can be seen in the comment above.
  *
  * EXAMPLE: One level.
  * This can be seen in the extension 'frontend' where the info module have a
@@ -55,53 +54,12 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
  * 'LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:mod_tx_cms_webinfo_page'
  * );
  *
- * EXAMPLE: Two levels.
- * This is the advanced example. You can see it with the extension 'func_wizards'
- * which is the first layer but then providing another layer for extensions to connect by.
- * The key used in TBE_MODULES_EXT is normally 'function' (for the 'function menu')
- * but the 'func_wizards' extension uses an alternative key for its configuration: 'wiz'.
- * In the 'ext_tables.php' file of an extension ('wizard_crpages') which uses the
- * framework provided by 'func_wizards' this looks like this:
- *
- * \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction(
- * 'web_func',
- * \TYPO3\CMS\WizardCrpages\Controller\CreatePagesWizardModuleFunctionController::class
- * NULL,
- * 'LLL:EXT:wizard_crpages/locallang.xlf:wiz_crMany',
- * 'wiz'
- * );
- *
- * But for this two-level thing to work it also requires that the parent
+ * For this two-level thing to work it also requires that the parent
  * module (the real backend module) supports it.
- * This is the case for the modules web_func and web_info since they have two
- * times inclusion sections in their index.php scripts. For example (from web_func):
- *
- * Make instance:
- * $GLOBALS['SOBE'] = GeneralUtility::makeInstance(\TYPO3\CMS\Func\Controller\PageFunctionsController::class);
- * $GLOBALS['SOBE']->init();
- *
- * Anyways, the final interesting thing is to see what the framework
- * "func_wizard" actually does:
- *
- * class WebFunctionWizardsBaseController extends \TYPO3\CMS\Backend\Module\AbstractFunctionModule {
- * var $localLangFile = "locallang.xlf";
- * var $function_key = "wiz";
- * function init(&$pObj, $conf) {
- * OK, handles ordinary init. This includes setting up the
- * menu array with ->modMenu
- * parent::init($pObj,$conf);
- * $this->handleExternalFunctionValue();
- * }
- * }
- *
- * Notice that the handleExternalFunctionValue of this class
- * is called and that the ->function_key internal var is set!
+ * This is the case for the modules web_info since it has two
+ * times inclusion sections in their index.php scripts.
  *
- * The two level-2 sub-module "wizard_crpages" and "wizard_sortpages"
- * are totally normal "submodules".
  * @see \TYPO3\CMS\Backend\Module\BaseScriptClass
- * @see \TYPO3\CMS\FuncWizards\Controller\WebFunctionWizardsBaseController
- * @see \TYPO3\CMS\WizardSortpages\View\SortPagesWizardModuleFunction
  */
 abstract class AbstractFunctionModule
 {
diff --git a/typo3/sysext/backend/Classes/ViewHelpers/ModuleLinkViewHelper.php b/typo3/sysext/backend/Classes/ViewHelpers/ModuleLinkViewHelper.php
new file mode 100644 (file)
index 0000000..9ef56fa
--- /dev/null
@@ -0,0 +1,52 @@
+<?php
+declare(strict_types=1);
+namespace TYPO3\CMS\Backend\ViewHelpers;
+
+/*
+ * 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!
+ */
+
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
+use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
+use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
+
+/**
+ * Create internal link within backend app
+ */
+class ModuleLinkViewHelper extends AbstractViewHelper
+{
+    use CompileWithRenderStatic;
+
+    /**
+     * Initializes the arguments
+     */
+    public function initializeArguments()
+    {
+        parent::initializeArguments();
+        $this->registerArgument('route', 'string', 'The route to link to', true);
+        $this->registerArgument('arguments', 'array', 'Additional link arguments', false, []);
+    }
+
+    /**
+     * Render module link with arguments
+     *
+     * @param array $arguments
+     * @param \Closure $renderChildrenClosure
+     * @param RenderingContextInterface $renderingContext
+     * @return string
+     */
+    public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext): string
+    {
+        return BackendUtility::getModuleUrl($arguments['route'], $arguments['arguments']);
+    }
+}
index 6dfb145..9485643 100644 (file)
@@ -125,6 +125,18 @@ return [
         'target' => Controller\NewRecordController::class . '::mainAction'
     ],
 
+    // Register sort pages
+    'pages_sort' => [
+        'path' => '/pages/sort',
+        'target' => Controller\Page\SortSubPagesController::class . '::mainAction'
+    ],
+
+    // Register create multiple pages
+    'pages_new' => [
+        'path' => '/pages/new',
+        'target' => Controller\Page\NewMultiplePagesController::class . '::mainAction'
+    ],
+
     // Register new content element module
     'new_content_element' => [
         'path' => '/record/content/new',
diff --git a/typo3/sysext/backend/Resources/Private/Language/locallang_pages_new.xlf b/typo3/sysext/backend/Resources/Private/Language/locallang_pages_new.xlf
new file mode 100644 (file)
index 0000000..f322936
--- /dev/null
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
+       <file t3:id="1415815013" source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:37Z" product-name="backend">
+               <header/>
+               <body>
+                       <trans-unit id="title">
+                               <source>Create multiple pages</source>
+                       </trans-unit>
+
+                       <trans-unit id="canNotCreateNew.title">
+                               <source>Insufficient permissions</source>
+                       </trans-unit>
+                       <trans-unit id="canNotCreateNew.message">
+                               <source>Sorry, you are not allowed to create new subpages to this page due to access restrictions.</source>
+                       </trans-unit>
+
+                       <trans-unit id="newPage">
+                               <source>Page</source>
+                       </trans-unit>
+                       <trans-unit id="addMoreLines">
+                               <source>Add more lines</source>
+                       </trans-unit>
+                       <trans-unit id="listEnd">
+                               <source>Place new pages after the existing subpages</source>
+                       </trans-unit>
+                       <trans-unit id="hidePages">
+                               <source>Hide new pages</source>
+                       </trans-unit>
+                       <trans-unit id="hidePagesInMenus">
+                               <source>Hide new pages in menus</source>
+                       </trans-unit>
+                       <trans-unit id="create">
+                               <source>Create pages</source>
+                       </trans-unit>
+                       <trans-unit id="reset">
+                               <source>Clear fields</source>
+                       </trans-unit>
+
+                       <trans-unit id="newSubPages">
+                               <source>New page structure</source>
+                       </trans-unit>
+                       <trans-unit id="noPagesCreated.title">
+                               <source>No pages added</source>
+                       </trans-unit>
+                       <trans-unit id="noPagesCreated.message">
+                               <source>No pages were created.</source>
+                       </trans-unit>
+                       <trans-unit id="pagesCreated.title">
+                               <source>Pages added</source>
+                       </trans-unit>
+                       <trans-unit id="pagesCreated.message">
+                               <source>The pages were created successfully.</source>
+                       </trans-unit>
+               </body>
+       </file>
+</xliff>
diff --git a/typo3/sysext/backend/Resources/Private/Language/locallang_pages_new_csh.xlf b/typo3/sysext/backend/Resources/Private/Language/locallang_pages_new_csh.xlf
new file mode 100644 (file)
index 0000000..1777fae
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
+       <file t3:id="1415815014" source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:37Z" product-name="backend">
+               <header/>
+               <body>
+                       <trans-unit id="pages_new.alttitle">
+                               <source>Create multiple pages</source>
+                       </trans-unit>
+                       <trans-unit id="pages_new.description" xml:space="preserve">
+                               <source>Enables you to create a batch of new, empty pages for quickly building up a new page tree.
+Just enter the titles for the pages you need. Only filled in fields will be created as pages.</source>
+                       </trans-unit>
+                       <trans-unit id="pages_new.details" xml:space="preserve">
+                               <source>The new pages will always be created as subpages to the currently active page from the page tree. This page is shown in the top of the page. In the example image below it is "/Intro/Startpage/".
+
+&lt;b&gt;"Place new pages after the existing subpages"&lt;/b&gt;
+If you select this option the pages will be create &lt;em&gt;after&lt;/em&gt; any existing subpages.
+
+&lt;b&gt;"Hide new pages"&lt;/b&gt;
+Select this if the new pages should be hidden by default. This option may be forced upon you if you do not have credentials to create new, online pages.</source>
+                       </trans-unit>
+                       <trans-unit id="_pages_new.image" xml:space="preserve">
+                               <source>EXT:backend/Resources/Public/Images/Csh/PagesNew_1.png,
+EXT:backend/Resources/Public/Images/Csh/PagesNew_2.png</source>
+                       </trans-unit>
+                       <trans-unit id="pages_new.image_descr" xml:space="preserve">
+                               <source>You simply enter the new page titles in the fields. Only fields you fill in will be created as pages.
+After pressing the "Create pages" button the page tree to the left will update instantly, showing you the position of the new pages!</source>
+                       </trans-unit>
+               </body>
+       </file>
+</xliff>
diff --git a/typo3/sysext/backend/Resources/Private/Language/locallang_pages_sort.xlf b/typo3/sysext/backend/Resources/Private/Language/locallang_pages_sort.xlf
new file mode 100644 (file)
index 0000000..41e0f46
--- /dev/null
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
+       <file t3:id="1498839785" source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:37Z" product-name="backend">
+               <header/>
+               <body>
+                       <trans-unit id="title">
+                               <source>Sort sub pages</source>
+                       </trans-unit>
+                       <trans-unit id="currentPageOrder">
+                               <source>Current page order</source>
+                       </trans-unit>
+                       <trans-unit id="changeOrder">
+                               <source>Sort these pages by</source>
+                       </trans-unit>
+                       <trans-unit id="changeOrderConfirm">
+                               <source>You're about to change the order of the above pages. Are you sure you want to continue?</source>
+                       </trans-unit>
+
+                       <trans-unit id="fieldTitle">
+                               <source>Page title</source>
+                       </trans-unit>
+                       <trans-unit id="fieldSubtitle">
+                               <source>Subtitle</source>
+                       </trans-unit>
+                       <trans-unit id="fieldCrdate">
+                               <source>Create-time</source>
+                       </trans-unit>
+                       <trans-unit id="fieldTstamp">
+                               <source>Change-time</source>
+                       </trans-unit>
+
+                       <trans-unit id="changeOrderByTitle">
+                               <source>Page title</source>
+                       </trans-unit>
+                       <trans-unit id="changeOrderBySubtitle">
+                               <source>Subtitle</source>
+                       </trans-unit>
+                       <trans-unit id="changeOrderByTstamp">
+                               <source>Change-time</source>
+                       </trans-unit>
+                       <trans-unit id="changeOrderByCreate">
+                               <source>Create-time</source>
+                       </trans-unit>
+                       <trans-unit id="changeOrderReverse">
+                               <source>Reverse current order</source>
+                       </trans-unit>
+
+                       <trans-unit id="hasInvisiblePage.title">
+                               <source>Invisible subpages</source>
+                       </trans-unit>
+                       <trans-unit id="hasInvisiblePage.message">
+                               <source>The page has invisible subpages which are not shown due to access restrictions. Those will not be sorted among others.</source>
+                       </trans-unit>
+                       <trans-unit id="noSubpages.title">
+                               <source>No subpages</source>
+                       </trans-unit>
+                       <trans-unit id="noSubpages.message">
+                               <source>Please select a page with subpages.</source>
+                       </trans-unit>
+                       <trans-unit id="notAvailableInWorkspace.title">
+                               <source>Not implemented</source>
+                       </trans-unit>
+                       <trans-unit id="notAvailableInWorkspace.message">
+                               <source>Sorry, this function is not available in the current draft workspace!</source>
+                       </trans-unit>
+                       <trans-unit id="noEditPermissions">
+                               <source>No edit permissions on this sub page. This page can not be re-sorted among others.</source>
+                       </trans-unit>
+               </body>
+       </file>
+</xliff>
diff --git a/typo3/sysext/backend/Resources/Private/Language/locallang_pages_sort_csh.xlf b/typo3/sysext/backend/Resources/Private/Language/locallang_pages_sort_csh.xlf
new file mode 100644 (file)
index 0000000..1a13704
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
+       <file t3:id="1415815016" source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:37Z" product-name="backend">
+               <header/>
+               <body>
+                       <trans-unit id="pages_sort.alttitle">
+                               <source>Sort Pages</source>
+                       </trans-unit>
+                       <trans-unit id="pages_sort.description">
+                               <source>Enables you to sort pages alphabetically by title, sub-title or by creation time etc. You can also reverse the order of pages in the page tree.</source>
+                       </trans-unit>
+                       <trans-unit id="pages_sort.details" xml:space="preserve">
+                               <source>Pages in the page tree are always ordered manually. It is possible to move pages up and down etc. But this wizard gives you a quick way to change the manual order of sub-pages.
+
+Simply click one of the links in the bottom of the wizard screen:
+
+&lt;b&gt;Page title&lt;/b&gt;
+Will sort pages by their page title.
+
+&lt;b&gt;Subtitle&lt;/b&gt;
+Will sort page by their Subtitle field.
+
+&lt;b&gt;Change-time&lt;/b&gt;
+Will sort pages by the date they were last changed.
+
+&lt;b&gt;Create-time&lt;/b&gt;
+Will sort pages by their creation date.
+
+&lt;b&gt;Reverse current order&lt;/b&gt;
+Click this to reverse the current order. For example, if you want to sort pages alphabetically but in descending order you simply sort by title first and then reverse the order by clicking this.</source>
+                       </trans-unit>
+                       <trans-unit id="_pages_sort.image">
+                               <source>EXT:backend/Resources/Public/Images/Csh/PagesSort.png</source>
+                       </trans-unit>
+               </body>
+       </file>
+</xliff>
diff --git a/typo3/sysext/backend/Resources/Private/Templates/Page/NewPages.html b/typo3/sysext/backend/Resources/Private/Templates/Page/NewPages.html
new file mode 100644 (file)
index 0000000..a29c8b0
--- /dev/null
@@ -0,0 +1,150 @@
+{namespace be = TYPO3\CMS\Backend\ViewHelpers}
+
+<f:be.pageRenderer
+    includeRequireJsModules="{
+        0:'TYPO3/CMS/Backend/ContextMenu',
+        1:'TYPO3/CMS/Backend/NewMultiplePages'
+    }"
+/>
+
+<h1>
+    <f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_new:title" />
+</h1>
+
+<f:if condition="!{canCreateNew}">
+    <f:then>
+        <f:be.infobox
+            title="{f:translate(key:'LLL:EXT:backend/Resources/Private/Language/locallang_pages_new:canNotCreateNew.title')}"
+            message="{f:translate(key:'LLL:EXT:backend/Resources/Private/Language/locallang_pages_new:canNotCreateNew.message')}"
+            state="-1"
+        />
+    </f:then>
+    <f:else>
+        <f:if condition="{hasNewPagesData}">
+            <f:then>
+                <f:if condition="{pagesCreated}">
+                    <f:then>
+                        <f:be.infobox
+                            title="{f:translate(key:'LLL:EXT:backend/Resources/Private/Language/locallang_pages_new:pagesCreated.title')}"
+                            message="{f:translate(key:'LLL:EXT:backend/Resources/Private/Language/locallang_pages_new:pagesCreated.message')}"
+                            state="-1"
+                        />
+                    </f:then>
+                    <f:else>
+                        <f:be.infobox
+                            title="{f:translate(key:'LLL:EXT:backend/Resources/Private/Language/locallang_pages_new:noPagesCreated.title')}"
+                            message="{f:translate(key:'LLL:EXT:backend/Resources/Private/Language/locallang_pages_new:noPagesCreated.message')}"
+                            state="1"
+                        />
+                    </f:else>
+                </f:if>
+                <f:if condition="{visiblePages}">
+                    <div class="form-group">
+                        <h2>
+                            <f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_new:newSubPages"/>
+                        </h2>
+                        <f:for each="{visiblePages}" as="page">
+                            <core:iconForRecord table="pages" row="{page}" />
+                            {page.title -> f:format.crop(maxCharacters: maxTitleLength)}
+                            <br />
+                        </f:for>
+                    </div>
+                </f:if>
+            </f:then>
+            <f:else>
+                <div class="t3js-newmultiplepages-newlinetemplate" style="display:none">
+                    <f:render section="FormLine" arguments="{line: {index: '[0]', label: '[1]', pageTypes: '{pageTypes}'}}" />
+                </div>
+
+                <form action="{be:moduleLink(route:'pages_new', arguments:'{id:pageUid}')}" method="post">
+                    <div class="form-group t3js-newmultiplepages-container">
+                        <f:render section="FormLine" arguments="{line: {index: '0', label: '1', pageTypes: '{pageTypes}'}}" />
+                        <f:render section="FormLine" arguments="{line: {index: '1', label: '2', pageTypes: '{pageTypes}'}}" />
+                        <f:render section="FormLine" arguments="{line: {index: '2', label: '3', pageTypes: '{pageTypes}'}}" />
+                        <f:render section="FormLine" arguments="{line: {index: '3', label: '4', pageTypes: '{pageTypes}'}}" />
+                        <f:render section="FormLine" arguments="{line: {index: '4', label: '5', pageTypes: '{pageTypes}'}}" />
+                    </div>
+
+                    <div class="form-group">
+                        <input
+                            class="btn btn-default t3js-newmultiplepages-createnewfields"
+                            type="button"
+                            value="{f:translate(key:'LLL:EXT:backend/Resources/Private/Language/locallang_pages_new:addMoreLines')}"
+                        />
+                    </div>
+
+                    <div class="form-group">
+                        <div class="checkbox">
+                            <label for="createInListEnd">
+                                <input type="checkbox" name="createInListEnd" id="createInListEnd" value="1" />
+                                <f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_new:listEnd" />
+                            </label>
+                        </div>
+                        <div class="checkbox">
+                            <label for="hidePages">
+                                <input type="checkbox" name="hidePages" id="hidePages" value="1" />
+                                <f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_new:hidePages" />
+                            </label>
+                        </div>
+                        <div class="checkbox">
+                            <label for="hidePagesInMenus">
+                                <input type="checkbox" name="hidePagesInMenus" id="hidePagesInMenus" value="1" />
+                                <f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_new:hidePagesInMenus" />
+                            </label>
+                        </div>
+                    </div>
+
+                    <div class="form-group">
+                        <input
+                            class="btn btn-default"
+                            type="submit"
+                            name="create"
+                            value="{f:translate(key:'LLL:EXT:backend/Resources/Private/Language/locallang_pages_new:create')}"
+                        />
+                        <input
+                            class="btn btn-default"
+                            type="reset"
+                            value="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_pages_new:reset')}"
+                        />
+                    </div>
+                </form>
+            </f:else>
+        </f:if>
+    </f:else>
+</f:if>
+
+<f:section name="FormLine">
+    <div class="form-section" id="form-line-{line.index}">
+        <div class="row">
+            <div class="form-group col-xs-8">
+                <label for="page_new_{line.index}">
+                    <f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_new:newPage"/> {line.label}:
+                </label>
+                <div class="form-control-wrap">
+                    <input class="form-control" type="text" id="page_new_{line.index}" name="pages[NEW{line.index}][title]" />
+                </div>
+            </div>
+            <div class="form-group col-xs-4">
+                <label for="page_new_select_{line.index}">
+                    <f:translate key="LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.type"/>
+                </label>
+                <div class="form-control-wrap">
+                    <div class="input-group">
+                        <div id="page_new_icon_{line.index}" class="input-group-addon input-group-icon">
+                            <core:iconForRecord table="pages" row="{id: '0'}" />
+                        </div>
+                        <select id="page_new_select_{line.index}" class="form-control form-control-adapt t3js-newmultiplepages-select-doktype" name="pages[NEW{line.index}][doktype]" data-target="#page_new_icon_{line.index}">
+                            <f:for each="{line.pageTypes}" as="typegroup" key="group">
+                                <optgroup label="{f:translate(key: '{group}')}">
+                                    <f:for each="{typegroup}" as="type">
+                                        <option data-icon='{core:icon(identifier: "{type.2}")}' value="{type.1}">{f:translate(key: '{type.0}')}</option>
+                                    </f:for>
+                                </optgroup>
+                            </f:for>
+                        </select>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</f:section>
diff --git a/typo3/sysext/backend/Resources/Private/Templates/Page/SortSubPages.html b/typo3/sysext/backend/Resources/Private/Templates/Page/SortSubPages.html
new file mode 100644 (file)
index 0000000..2de5889
--- /dev/null
@@ -0,0 +1,143 @@
+{namespace be = TYPO3\CMS\Backend\ViewHelpers}
+
+<f:be.pageRenderer
+    includeRequireJsModules="{
+        0:'TYPO3/CMS/Backend/ContextMenu',
+        1:'TYPO3/CMS/Backend/Modal',
+        2:'TYPO3/CMS/Backend/Tooltip'
+    }"
+/>
+
+<h1>
+    <f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort:title" />
+</h1>
+
+<f:if condition="{isInWorkspace}">
+    <f:then>
+        <f:be.infobox
+            title="{f:translate(key:'LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort:notAvailableInWorkspace.title')}"
+            message="{f:translate(key:'LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort:notAvailableInWorkspace.message')}"
+            state="-1"
+        />
+    </f:then>
+    <f:else>
+        <f:if condition="{subPages}">
+            <f:then>
+                <f:if condition="{hasInvisiblePage}">
+                    <f:be.infobox
+                        title="{f:translate(key:'LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort:hasInvisiblePage.title')}"
+                        message="{f:translate(key:'LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort:hasInvisiblePage.message')}"
+                        state="-1"
+                    />
+                </f:if>
+
+                <h2>
+                    <f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort:currentPageOrder" />
+                </h2>
+
+                <div class="table-fit">
+                    <table class="table table-striped table-hover">
+                        <thead>
+                            <tr>
+                                <th>
+                                    <f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort:fieldTitle" />
+                                </th>
+                                <th>
+                                    <f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort:fieldSubtitle" />
+                                </th>
+                                <th>
+                                    <f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort:fieldTstamp" />
+                                </th>
+                                <th>
+                                    <f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort:fieldCrdate" />
+                                </th>
+                            </tr>
+                        </thead>
+
+                        <f:for each="{subPages}" as="page">
+                            <tr>
+                                <td class="text-nowrap">
+                                    <core:iconForRecord table="pages" row="{page.record}" />
+                                    <f:if condition="!{page.canEdit}">
+                                        <span
+                                            data-toggle="tooltip"
+                                            data-title="{f:translate(key:'LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort:noEditPermissions')}"
+                                        >
+                                            <core:icon identifier="status-status-permission-denied" />
+                                        </span>
+                                    </f:if>
+                                    {page.record.title -> f:format.crop(maxCharacters: maxTitleLength)}
+                                </td>
+                                <td class="text-nowrap">
+                                    {page.record.subtitle -> f:format.crop(maxCharacters: maxTitleLength)}
+                                </td>
+                                <td class="text-nowrap">
+                                    <f:format.date format="{dateFormat} {timeFormat}">{page.record.tstamp}</f:format.date>
+                                </td>
+                                <td class="text-nowrap">
+                                    <f:format.date format="{dateFormat} {timeFormat}">{page.record.crdate}</f:format.date>
+                                </td>
+                            </tr>
+                        </f:for>
+                    </table>
+                </div>
+
+                <h2>
+                    <f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort:changeOrder"/>
+                </h2>
+                <a class="btn btn-default t3js-modal-trigger"
+                    href="{be:moduleLink(route:'pages_sort', arguments:'{id:parentPageUid, newSortBy:\'title\'}')}"
+                    data-severity="warning"
+                    data-title="{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_common.xlf:pleaseConfirm')}"
+                    data-button-close-text="{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_common.xlf:cancel')}"
+                    data-content="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort:changeOrderConfirm')}"
+                >
+                    <f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort:changeOrderByTitle" />
+                </a>
+                <a class="btn btn-default t3js-modal-trigger"
+                    href="{be:moduleLink(route:'pages_sort', arguments:'{id:parentPageUid, newSortBy:\'subtitle\'}')}"
+                    data-severity="warning"
+                    data-title="{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_common.xlf:pleaseConfirm')}"
+                    data-button-close-text="{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_common.xlf:cancel')}"
+                    data-content="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort:changeOrderConfirm')}"
+                >
+                    <f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort:changeOrderBySubtitle" />
+                </a>
+                <a class="btn btn-default t3js-modal-trigger"
+                    href="{be:moduleLink(route:'pages_sort', arguments:'{id:parentPageUid, newSortBy:\'tstamp\'}')}"
+                    data-severity="warning"
+                    data-title="{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_common.xlf:pleaseConfirm')}"
+                    data-button-close-text="{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_common.xlf:cancel')}"
+                    data-content="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort:changeOrderConfirm')}"
+                >
+                    <f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort:changeOrderByTstamp" />
+                </a>
+                <a class="btn btn-default t3js-modal-trigger"
+                    href="{be:moduleLink(route:'pages_sort', arguments:'{id:parentPageUid, newSortBy:\'create\'}')}"
+                    data-severity="warning"
+                    data-title="{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_common.xlf:pleaseConfirm')}"
+                    data-button-close-text="{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_common.xlf:cancel')}"
+                    data-content="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort:changeOrderConfirm')}"
+                >
+                    <f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort:changeOrderByCreate" />
+                </a>
+                <a class="btn btn-default t3js-modal-trigger"
+                    href="{be:moduleLink(route:'pages_sort', arguments:'{id:parentPageUid, newSortBy:\'reverseCurrentSorting\'}')}"
+                    data-severity="warning"
+                    data-title="{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_common.xlf:pleaseConfirm')}"
+                    data-button-close-text="{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_common.xlf:cancel')}"
+                    data-content="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort:changeOrderConfirm')}"
+                >
+                    <f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort:changeOrderReverse" />
+                </a>
+            </f:then>
+            <f:else>
+                <f:be.infobox
+                    title="{f:translate(key:'LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort:noSubpages.title')}"
+                    message="{f:translate(key:'LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort:noSubpages.message')}"
+                    state="-1"
+                />
+            </f:else>
+        </f:if>
+    </f:else>
+</f:if>
diff --git a/typo3/sysext/backend/Resources/Public/Images/Csh/PagesNew_1.png b/typo3/sysext/backend/Resources/Public/Images/Csh/PagesNew_1.png
new file mode 100644 (file)
index 0000000..4867f69
Binary files /dev/null and b/typo3/sysext/backend/Resources/Public/Images/Csh/PagesNew_1.png differ
diff --git a/typo3/sysext/backend/Resources/Public/Images/Csh/PagesNew_2.png b/typo3/sysext/backend/Resources/Public/Images/Csh/PagesNew_2.png
new file mode 100644 (file)
index 0000000..695c574
Binary files /dev/null and b/typo3/sysext/backend/Resources/Public/Images/Csh/PagesNew_2.png differ
diff --git a/typo3/sysext/backend/Resources/Public/Images/Csh/PagesSort.png b/typo3/sysext/backend/Resources/Public/Images/Csh/PagesSort.png
new file mode 100644 (file)
index 0000000..903bdba
Binary files /dev/null and b/typo3/sysext/backend/Resources/Public/Images/Csh/PagesSort.png differ
index 999d965..47535a8 100644 (file)
@@ -95,6 +95,20 @@ define(['jquery', 'TYPO3/CMS/Backend/Modal', 'TYPO3/CMS/Backend/Severity'], func
         top.TYPO3.ModuleMenu.App.showModule('web_list', 'id='.pageId);
     };
 
+    ContextMenuActions.pagesSort = function (table, uid) {
+        var pagesSortUrl = $(this).data('pages-sort-url');
+        if (pagesSortUrl) {
+            top.TYPO3.Backend.ContentContainer.setUrl(pagesSortUrl);
+        }
+    };
+
+    ContextMenuActions.pagesNewMultiple = function (table, uid) {
+        var pagesSortUrl = $(this).data('pages-new-multiple-url');
+        if (pagesSortUrl) {
+            top.TYPO3.Backend.ContentContainer.setUrl(pagesSortUrl);
+        }
+    };
+
     ContextMenuActions.disableRecord = function (table, uid) {
         top.TYPO3.Backend.ContentContainer.setUrl(
             top.TYPO3.settings.RecordCommit.moduleUrl + '&data[' + table + '][' + uid + '][hidden]=1&prErr=1&redirect=' + ContextMenuActions.getReturnUrl()
diff --git a/typo3/sysext/backend/Resources/Public/JavaScript/NewMultiplePages.js b/typo3/sysext/backend/Resources/Public/JavaScript/NewMultiplePages.js
new file mode 100644 (file)
index 0000000..7de0e7d
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * 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!
+ */
+
+/**
+ * Module: TYPO3/CMS/Backend/NewMultiplePages
+ * JavaScript functions for creating multiple pages
+ */
+define(['jquery'], function($) {
+       'use strict';
+
+       /**
+        * @type {{lineCounter: number, containerSelector: string, addMoreFieldsButtonSelector: string, doktypeSelector: string}}
+        * @exports TYPO3/CMS/Backend/NewMultiplePages
+        */
+       var NewMultiplePages = {
+               lineCounter: 5,
+               containerSelector: '.t3js-newmultiplepages-container',
+               addMoreFieldsButtonSelector: '.t3js-newmultiplepages-createnewfields',
+               doktypeSelector: '.t3js-newmultiplepages-select-doktype',
+               templateRow: '.t3js-newmultiplepages-newlinetemplate'
+       };
+
+       /**
+        * Add further input rows
+        */
+       NewMultiplePages.createNewFormFields = function() {
+               for (var i = 0; i < 5; i++) {
+                       var label = NewMultiplePages.lineCounter + i + 1;
+                       var line = $(NewMultiplePages.templateRow).html()
+                               .replace(/\[0\]/g, (NewMultiplePages.lineCounter + i))
+                               .replace(/\[1\]/g, label);
+                       $(line).appendTo(NewMultiplePages.containerSelector);
+               }
+               NewMultiplePages.lineCounter += 5;
+       };
+
+       /**
+        * @param {Object} $selectElement
+        */
+       NewMultiplePages.actOnTypeSelectChange = function($selectElement) {
+               var $optionElement = $selectElement.find(':selected');
+               var $target = $($selectElement.data('target'));
+               $target.html($optionElement.data('icon'));
+       };
+
+       /**
+        * Register listeners
+        */
+       NewMultiplePages.initializeEvents = function() {
+               $(NewMultiplePages.addMoreFieldsButtonSelector).on('click', function() {
+                       NewMultiplePages.createNewFormFields();
+               });
+
+               $(document).on('change', NewMultiplePages.doktypeSelector, function() {
+                       NewMultiplePages.actOnTypeSelectChange($(this));
+               });
+       };
+
+       $(NewMultiplePages.initializeEvents);
+
+       return NewMultiplePages;
+});
index 555b7dc..18fa964 100644 (file)
@@ -27,3 +27,14 @@ if (TYPO3_MODE === 'BE') {
     // Register BackendLayoutDataProvider for PageTs
     $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['BackendLayoutDataProvider']['pagets'] = \TYPO3\CMS\Backend\Provider\PageTsBackendLayoutDataProvider::class;
 }
+
+// "Sort sub pages" csh
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr(
+    'pages_sort',
+    'EXT:backend/Resources/Private/Language/locallang_pages_sort_csh.xlf'
+);
+// "Create multiple pages" csh
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr(
+    'pages_new',
+    'EXT:backend/Resources/Private/Language/locallang_pages_new_csh.xlf'
+);
index 425d59d..8c31d1b 100644 (file)
@@ -41,7 +41,7 @@ Move the following references to the new location of the language file:
 * lang/locallang_csh_sysfilem.xlf -> lang/Resources/Private/Language/locallang_csh_sysfilem.xlf
 * lang/locallang_csh_syslang.xlf -> lang/Resources/Private/Language/locallang_csh_syslang.xlf
 * lang/locallang_csh_sysnews.xlf -> lang/Resources/Private/Language/locallang_csh_sysnews.xlf
-* lang/locallang_csh_web_func.xlf -> lang/Resources/Private/Language/locallang_csh_web_func.xlf
+* lang/locallang_csh_web_func.xlf -> func/Resources/Private/Language/locallang_csh_web_func.xlf
 * lang/locallang_csh_web_info.xlf -> lang/Resources/Private/Language/locallang_csh_web_info.xlf
 * lang/locallang_general.xlf -> lang/Resources/Private/Language/locallang_general.xlf
 * lang/locallang_login.xlf -> lang/Resources/Private/Language/locallang_login.xlf
@@ -55,7 +55,7 @@ Move the following references to the new location of the language file:
 * lang/locallang_mod_system.xlf -> lang/Resources/Private/Language/locallang_mod_system.xlf
 * lang/locallang_mod_usertools.xlf -> lang/Resources/Private/Language/locallang_mod_usertools.xlf
 * lang/locallang_mod_user_ws.xlf -> lang/Resources/Private/Language/locallang_mod_user_ws.xlf
-* lang/locallang_mod_web_func.xlf -> lang/Resources/Private/Language/locallang_mod_web_func.xlf
+* lang/locallang_mod_web_func.xlf -> func/Resources/Private/Language/locallang_mod_web_func.xlf
 * lang/locallang_mod_web_info.xlf -> lang/Resources/Private/Language/locallang_mod_web_info.xlf
 * lang/locallang_mod_web_list.xlf -> lang/Resources/Private/Language/locallang_mod_web_list.xlf
 * lang/locallang_mod_web.xlf -> lang/Resources/Private/Language/locallang_mod_web.xlf
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Important-81768-CreatePagesAndSortPagesInContextMenu.rst b/typo3/sysext/core/Documentation/Changelog/master/Important-81768-CreatePagesAndSortPagesInContextMenu.rst
new file mode 100644 (file)
index 0000000..5a45fa3
--- /dev/null
@@ -0,0 +1,18 @@
+.. include:: ../../Includes.txt
+
+===============================================================
+Important: #81768 - Create pages and sort pages in context menu
+===============================================================
+
+See :issue:`81768`
+
+Description
+===========
+
+The two backend modules "Sort pages" and "Create multiple pages" in the
+Web -> Functions main module have been moved.
+They are now reachable as context menu entries in the "more" section
+on all page records, for instance by clicking a page icon in the page
+tree or the list module.
+
+.. index:: Backend
\ No newline at end of file
index 06013f7..3b81f7d 100644 (file)
@@ -107,8 +107,6 @@ $GLOBALS['TBE_STYLES'] = [];
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('xMOD_csh_corebe', 'EXT:lang/Resources/Private/Language/locallang_csh_corebe.xlf');
 // Web > Info
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_web_info', 'EXT:lang/Resources/Private/Language/locallang_csh_web_info.xlf');
-// Web > Func
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_web_func', 'EXT:lang/Resources/Private/Language/locallang_csh_web_func.xlf');
 
 if (TYPO3_MODE === 'BE' || TYPO3_MODE === 'FE' && isset($GLOBALS['BE_USER'])) {
     // extJS theme
index c5fdcc7..4ea8692 100644 (file)
@@ -9,7 +9,7 @@
                <languageKey index="default" type="array">
                        <label index=".alttitle">Blog Example</label>
                        <label index=".description">This is some dummy help. But it's context sensitive!</label>
-                       <label index=".seeAlso">_MOD_web_func:tx_wizardcrpages, _MOD_web_func:tx_wizardsortpages</label>
+                       <label index=".seeAlso">_MOD_web_layout:columns_single</label>
                </languageKey>
        </data>
 </T3locallang>
\ No newline at end of file
index a95d6b4..c7178a6 100644 (file)
@@ -630,7 +630,6 @@ class PageRepository
      * @param bool $checkShortcuts Check if shortcuts exist, checks by default
      * @return array Array with key/value pairs; keys are page-uid numbers. values are the corresponding page records (with overlaid localized fields, if any)
      * @see \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::getPageShortcut(), \TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::makeMenu()
-     * @see \TYPO3\CMS\WizardCrpages\Controller\CreatePagesWizardModuleFunctionController, \TYPO3\CMS\WizardSortpages\View\SortPagesWizardModuleFunction
      */
     public function getMenu($pageId, $fields = '*', $sortField = 'sorting', $additionalWhereClause = '', $checkShortcuts = true)
     {
@@ -672,7 +671,6 @@ class PageRepository
      * @param bool $parentPages Whether the uid list is meant as list of parent pages or the page itself TRUE means id list is checked against pid field
      * @return array Array with key/value pairs; keys are page-uid numbers. values are the corresponding page records (with overlaid localized fields, if any)
      * @see \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::getPageShortcut(), \TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::makeMenu()
-     * @see \TYPO3\CMS\WizardCrpages\Controller\CreatePagesWizardModuleFunctionController, \TYPO3\CMS\WizardSortpages\View\SortPagesWizardModuleFunction
      */
     protected function getSubpagesForPages(array $pageIds, $fields = '*', $sortField = 'sorting', $additionalWhereClause = '', $checkShortcuts = true, $parentPages = true)
     {
index 51fcd67..32aa879 100644 (file)
@@ -74,7 +74,7 @@ class PageFunctionsController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
     {
         $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
         $this->moduleTemplate = GeneralUtility::makeInstance(ModuleTemplate::class);
-        $this->getLanguageService()->includeLLFile('EXT:lang/Resources/Private/Language/locallang_mod_web_func.xlf');
+        $this->getLanguageService()->includeLLFile('EXT:func/Resources/Private/Language/locallang_mod_web_func.xlf');
         $this->MCONF = [
             'name' => $this->moduleName,
         ];
diff --git a/typo3/sysext/func/Resources/Private/Language/locallang_csh_web_func.xlf b/typo3/sysext/func/Resources/Private/Language/locallang_csh_web_func.xlf
new file mode 100644 (file)
index 0000000..7c9de15
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
+       <file t3:id="1415814861" source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:33Z" product-name="lang">
+               <header/>
+               <body>
+                       <trans-unit id=".alttitle">
+                               <source>Web &gt; Functions module</source>
+                       </trans-unit>
+                       <trans-unit id=".description">
+                               <source>The idea of the Web&gt;Functions module is to be a host module for backend applications that wish to perform processing of pages or branches of the page tree.</source>
+                       </trans-unit>
+                       <trans-unit id=".details">
+                               <source>Conceptually the Web&gt;Functions module is different from the Web&gt;Info module only by offering processing  functionality rather than offering information only. It is up to extension programmers to decide in which of these two modules they want to insert functionality.</source>
+                       </trans-unit>
+                       <trans-unit id="_.seeAlso" xml:space="preserve">
+                               <source>_MOD_web_info,
+More about the Web&gt;Functions module | https://docs.typo3.org/typo3cms/InsideTypo3Reference/CoreArchitecture/CoreModules/FunctionsModule/,,
+_MOD_web_func:tx_funcwizards</source>
+                               <note from="developer">A part of this string is an internal text, which must not be changed. Just copy this part into the translation field and do not change it. For more information have a look at the Tutorial.</note>
+                       </trans-unit>
+                       <trans-unit id="_.image">
+                               <source>EXT:func/Resources/Public/Images/Csh/pagetree_overview_11.png</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>
+                       <trans-unit id=".image_descr">
+                               <source>The Web&gt;Functions module as provided by the core is an empty shell. It provides an API that extensions can use to attach function menu items to the Web&gt;Function module. This shows the Wizard extension (func_wizards) providing the main Function Menu item in upper right corner. The "Select Wizard" selectorbox allows the user to select another level of functionality (different wizards) which are provided by other extensions.</source>
+                       </trans-unit>
+               </body>
+       </file>
+</xliff>
diff --git a/typo3/sysext/func/Resources/Private/Language/locallang_mod_web_func.xlf b/typo3/sysext/func/Resources/Private/Language/locallang_mod_web_func.xlf
new file mode 100644 (file)
index 0000000..7708b09
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
+       <file t3:id="1415814879" source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:34Z" product-name="lang">
+               <header/>
+               <body>
+                       <trans-unit id="title">
+                               <source>Advanced functions</source>
+                       </trans-unit>
+                       <trans-unit id="clickAPage_content">
+                               <source>Please click a page title in the page tree.</source>
+                       </trans-unit>
+                       <trans-unit id="mlang_labels_tablabel">
+                               <source>Advanced functions</source>
+                       </trans-unit>
+                       <trans-unit id="mlang_labels_tabdescr">
+                               <source>This module contains general export and import functions in addition to specialised wizards enabling page sorting and batch creating of pages.</source>
+                       </trans-unit>
+                       <trans-unit id="mlang_tabs_tab">
+                               <source>Functions</source>
+                       </trans-unit>
+               </body>
+       </file>
+</xliff>
diff --git a/typo3/sysext/func/Resources/Public/Images/Csh/pagetree_overview_11.png b/typo3/sysext/func/Resources/Public/Images/Csh/pagetree_overview_11.png
new file mode 100644 (file)
index 0000000..6209158
Binary files /dev/null and b/typo3/sysext/func/Resources/Public/Images/Csh/pagetree_overview_11.png differ
index 49bea4e..0ef04f0 100644 (file)
@@ -12,7 +12,11 @@ if (TYPO3_MODE === 'BE') {
             'access' => 'user,group',
             'name' => 'web_func',
             'icon' => 'EXT:func/Resources/Public/Icons/module-func.svg',
-            'labels' => 'LLL:EXT:lang/Resources/Private/Language/locallang_mod_web_func.xlf'
+            'labels' => 'LLL:EXT:func/Resources/Private/Language/locallang_mod_web_func.xlf'
         ]
     );
+    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr(
+        '_MOD_web_func',
+        'EXT:func/Resources/Private/Language/locallang_csh_web_func.xlf'
+    );
 }
diff --git a/typo3/sysext/lang/Resources/Private/Language/locallang_csh_web_func.xlf b/typo3/sysext/lang/Resources/Private/Language/locallang_csh_web_func.xlf
deleted file mode 100644 (file)
index fc6e874..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
-       <file t3:id="1415814861" source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:33Z" product-name="lang">
-               <header/>
-               <body>
-                       <trans-unit id=".alttitle">
-                               <source>Web &gt; Functions module</source>
-                       </trans-unit>
-                       <trans-unit id=".description">
-                               <source>The idea of the Web&gt;Functions module is to be a host module for backend applications that wish to perform processing of pages or branches of the page tree.</source>
-                       </trans-unit>
-                       <trans-unit id=".details">
-                               <source>Conceptually the Web&gt;Functions module is different from the Web&gt;Info module only by offering processing  functionality rather than offering information only. It is up to extension programmers to decide in which of these two modules they want to insert functionality.</source>
-                       </trans-unit>
-                       <trans-unit id="_.seeAlso" xml:space="preserve">
-                               <source>_MOD_web_info,
-More about the Web&gt;Functions module | https://docs.typo3.org/typo3cms/InsideTypo3Reference/CoreArchitecture/CoreModules/FunctionsModule/,,
-_MOD_web_func:tx_funcwizards,
-_MOD_web_func:tx_wizardsortpages</source>
-                               <note from="developer">A part of this string is an internal text, which must not be changed. Just copy this part into the translation field and do not change it. For more information have a look at the Tutorial.</note>
-                       </trans-unit>
-                       <trans-unit id="_.image">
-                               <source>EXT:lang/Resources/Public/Images/cshimages/pagetree_overview_11.png</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>
-                       <trans-unit id=".image_descr">
-                               <source>The Web&gt;Functions module as provided by the core is an empty shell. It provides an API that extensions can use to attach function menu items to the Web&gt;Function module. This shows the Wizard extension (func_wizards) providing the main Function Menu item in upper right corner. The "Select Wizard" selectorbox allows the user to select another level of functionality (different wizards) which are provided by other extensions, here the "wizard_sortpages" extension.</source>
-                       </trans-unit>
-               </body>
-       </file>
-</xliff>
index 2e3ff15..7c4fc5a 100644 (file)
                                <source>The idea of the Web&gt;Info module is to be a host module for backend applications that wish to present information / analysis of pages or branches of the page tree. This could be website statistics, caching status information etc.</source>
                        </trans-unit>
                        <trans-unit id=".details">
-                               <source>Conceptually the Web&gt;Info module is different from the Web&gt;Functions module only by primarily showing information rather than offering functionality. It is up to extension programmers to decide in which of these two modules they want to insert functionality.</source>
-                       </trans-unit>
-                       <trans-unit id="_.seeAlso" xml:space="preserve">
-                               <source>_MOD_web_func,
-More about Web&gt;Info module framework | https://docs.typo3.org/typo3cms/InsideTypo3Reference/CoreArchitecture/CoreModules/InfoModule/,</source>
-                               <note from="developer">A part of this string is an internal text, which must not be changed. Just copy this part into the translation field and do not change it. For more information have a look at the Tutorial.</note>
+                               <source>The Web&gt;Info module shows information rather than offering functionality. It is up to extension programmers to decide in which of these two modules they want to insert functionality.</source>
                        </trans-unit>
                        <trans-unit id="_.image">
                                <source>EXT:lang/Resources/Public/Images/cshimages/pagetree_overview_10.png</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>
                        <trans-unit id=".image_descr">
                                <source>The Web&gt;Info module as provided by the core is an empty shell. It provides an API that extensions can use to attach function menu items to the Info module. Here you see the "Page TSconfig" overview from the extension "info_pagetsconfig".</source>
diff --git a/typo3/sysext/lang/Resources/Private/Language/locallang_mod_web_func.xlf b/typo3/sysext/lang/Resources/Private/Language/locallang_mod_web_func.xlf
deleted file mode 100644 (file)
index 7708b09..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
-       <file t3:id="1415814879" source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:34Z" product-name="lang">
-               <header/>
-               <body>
-                       <trans-unit id="title">
-                               <source>Advanced functions</source>
-                       </trans-unit>
-                       <trans-unit id="clickAPage_content">
-                               <source>Please click a page title in the page tree.</source>
-                       </trans-unit>
-                       <trans-unit id="mlang_labels_tablabel">
-                               <source>Advanced functions</source>
-                       </trans-unit>
-                       <trans-unit id="mlang_labels_tabdescr">
-                               <source>This module contains general export and import functions in addition to specialised wizards enabling page sorting and batch creating of pages.</source>
-                       </trans-unit>
-                       <trans-unit id="mlang_tabs_tab">
-                               <source>Functions</source>
-                       </trans-unit>
-               </body>
-       </file>
-</xliff>
diff --git a/typo3/sysext/lang/Resources/Public/Images/cshimages/pagetree_overview_11.png b/typo3/sysext/lang/Resources/Public/Images/cshimages/pagetree_overview_11.png
deleted file mode 100644 (file)
index 6209158..0000000
Binary files a/typo3/sysext/lang/Resources/Public/Images/cshimages/pagetree_overview_11.png and /dev/null differ
diff --git a/typo3/sysext/wizard_crpages/Classes/Controller/CreatePagesWizardModuleFunctionController.php b/typo3/sysext/wizard_crpages/Classes/Controller/CreatePagesWizardModuleFunctionController.php
deleted file mode 100644 (file)
index 0250b9a..0000000
+++ /dev/null
@@ -1,211 +0,0 @@
-<?php
-namespace TYPO3\CMS\WizardCrpages\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!
- */
-
-use TYPO3\CMS\Backend\Utility\BackendUtility;
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Messaging\FlashMessageService;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Fluid\View\StandaloneView;
-use TYPO3\CMS\Frontend\Page\PageRepository;
-
-/**
- * Creates the "Create pages" wizard
- */
-class CreatePagesWizardModuleFunctionController extends \TYPO3\CMS\Backend\Module\AbstractFunctionModule
-{
-    /**
-     * Complete tsConfig
-     *
-     * @var array
-     */
-    protected $tsConfig = [];
-
-    /**
-     * Part of tsConfig with TCEFORM.pages. settings
-     *
-     * @var array
-     */
-    protected $pagesTsConfig = [];
-
-    /**
-     * Main function creating the content for the module.
-     *
-     * @return string HTML content for the module, actually a "section" made through the parent object in $this->pObj
-     */
-    public function main()
-    {
-        $this->getLanguageService()->includeLLFile('EXT:wizard_crpages/Resources/Private/Language/locallang.xlf');
-        $assigns = [];
-        $assigns['LLPrefix'] = 'LLL:EXT:wizard_crpages/Resources/Private/Language/locallang.xlf:';
-        $this->tsConfig = BackendUtility::getPagesTSconfig($this->pObj->id);
-        $this->pagesTsConfig = isset($this->tsConfig['TCEFORM.']['pages.']) ? $this->tsConfig['TCEFORM.']['pages.'] : [];
-
-        // Create new pages here?
-        $pageRecord = BackendUtility::getRecord('pages', $this->pObj->id, 'uid', ' AND ' . $this->getBackendUser()->getPagePermsClause(8));
-        $pageRepository = GeneralUtility::makeInstance(PageRepository::class);
-        $menuItems = $pageRepository->getMenu($this->pObj->id, '*', 'sorting', '', false);
-        if (is_array($pageRecord)) {
-            $data = GeneralUtility::_GP('data');
-            if (is_array($data['pages'])) {
-                if (GeneralUtility::_GP('createInListEnd')) {
-                    $endI = end($menuItems);
-                    $thePid = -(int)$endI['uid'];
-                    if (!$thePid) {
-                        $thePid = $this->pObj->id;
-                    }
-                } else {
-                    $thePid = $this->pObj->id;
-                }
-                $firstRecord = true;
-                $previousIdentifier = '';
-                foreach ($data['pages'] as $identifier => $dat) {
-                    if (!trim($dat['title'])) {
-                        unset($data['pages'][$identifier]);
-                    } else {
-                        $data['pages'][$identifier]['hidden'] = GeneralUtility::_GP('hidePages') ? 1 : 0;
-                        $data['pages'][$identifier]['nav_hide'] = GeneralUtility::_GP('hidePagesInMenus') ? 1 : 0;
-                        if ($firstRecord) {
-                            $firstRecord = false;
-                            $data['pages'][$identifier]['pid'] = $thePid;
-                        } else {
-                            $data['pages'][$identifier]['pid'] = '-' . $previousIdentifier;
-                        }
-                        $previousIdentifier = $identifier;
-                    }
-                }
-                if (!empty($data['pages'])) {
-                    reset($data);
-                    $dataHandler = GeneralUtility::makeInstance(\TYPO3\CMS\Core\DataHandling\DataHandler::class);
-                    // set default TCA values specific for the user
-                    $TCAdefaultOverride = $this->getBackendUser()->getTSConfigProp('TCAdefaults');
-                    if (is_array($TCAdefaultOverride)) {
-                        $dataHandler->setDefaultsFromUserTS($TCAdefaultOverride);
-                    }
-                    $dataHandler->start($data, []);
-                    $dataHandler->process_datamap();
-                    BackendUtility::setUpdateSignal('updatePageTree');
-                    $flashMessage = GeneralUtility::makeInstance(FlashMessage::class, '', $this->getLanguageService()->getLL('wiz_newPages_create'));
-                } else {
-                    $flashMessage = GeneralUtility::makeInstance(FlashMessage::class, '', $this->getLanguageService()->getLL('wiz_newPages_noCreate'), FlashMessage::ERROR);
-                }
-                /** @var $flashMessageService \TYPO3\CMS\Core\Messaging\FlashMessageService */
-                $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
-                /** @var $defaultFlashMessageQueue \TYPO3\CMS\Core\Messaging\FlashMessageQueue */
-                $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
-                $defaultFlashMessageQueue->enqueue($flashMessage);
-                // Display result:
-                $menuItems = $pageRepository->getMenu($this->pObj->id, '*', 'sorting', '', false);
-                $pageLines = [];
-                foreach ($menuItems as $record) {
-                    BackendUtility::workspaceOL('pages', $record);
-                    if (is_array($record)) {
-                        $line = [];
-                        $line['titleAttribute'] = BackendUtility::titleAttribForPages($record, '', false);
-                        $line['title'] = GeneralUtility::fixed_lgd_cs($record['title'], $this->getBackendUser()->uc['titleLen']);
-                        $line['record'] = $record;
-                        $pageLines[] = $line;
-                    }
-                }
-                $assigns['pages'] = $pageLines;
-            } else {
-                // Display create form
-                $assigns['typeSelect'] = $this->getTypeSelectData();
-            }
-        } else {
-            $flashMessage = GeneralUtility::makeInstance(FlashMessage::class, '', $this->getLanguageService()->getLL('wiz_newPages_errorMsg1'), FlashMessage::ERROR);
-            /** @var $flashMessageService \TYPO3\CMS\Core\Messaging\FlashMessageService */
-            $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
-            /** @var $defaultFlashMessageQueue \TYPO3\CMS\Core\Messaging\FlashMessageQueue */
-            $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
-            $defaultFlashMessageQueue->enqueue($flashMessage);
-        }
-        // CSH
-        $assigns['cshItem'] = BackendUtility::cshItem('_MOD_web_func', 'tx_wizardcrpages');
-
-        // Rendering of the output via fluid
-        $view = GeneralUtility::makeInstance(StandaloneView::class);
-        $view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName(
-            'EXT:wizard_crpages/Resources/Private/Templates/CreatePagesWizard.html'
-        ));
-        $view->assignMultiple($assigns);
-        $out = $view->render();
-
-        return $out;
-    }
-
-    /**
-     * Get type selector data
-     *
-     * @return string
-     */
-    protected function getTypeSelectData()
-    {
-        // find all available doktypes for the current user
-        $types = $GLOBALS['PAGES_TYPES'];
-        unset($types['default']);
-        $types = array_keys($types);
-        $types[] = PageRepository::DOKTYPE_DEFAULT;
-        $types[] = PageRepository::DOKTYPE_LINK;
-        $types[] = PageRepository::DOKTYPE_SHORTCUT;
-        $types[] = PageRepository::DOKTYPE_MOUNTPOINT;
-        $types[] = PageRepository::DOKTYPE_SPACER;
-
-        if (!$this->getBackendUser()->isAdmin() && isset($this->getBackendUser()->groupData['pagetypes_select'])) {
-            $types = GeneralUtility::trimExplode(',', $this->getBackendUser()->groupData['pagetypes_select'], true);
-        }
-        $removeItems = isset($this->pagesTsConfig['doktype.']['removeItems']) ? GeneralUtility::trimExplode(',', $this->pagesTsConfig['doktype.']['removeItems'], true) : [];
-        $allowedDoktypes = array_diff($types, $removeItems);
-
-        // fetch all doktypes in the TCA
-        $availableDoktypes = $GLOBALS['TCA']['pages']['columns']['doktype']['config']['items'];
-
-        // sort by group and allowedDoktypes
-        $groupedData = [];
-        $groupLabel = '';
-        foreach ($availableDoktypes as $doktypeData) {
-            // if it is a group, save the group label for the children underneath
-            if ($doktypeData[1] === '--div--') {
-                $groupLabel = $doktypeData[0];
-            } else {
-                if (in_array($doktypeData[1], $allowedDoktypes)) {
-                    $groupedData[$groupLabel][] = $doktypeData;
-                }
-            }
-        }
-
-        return $groupedData;
-    }
-
-    /**
-     * Returns LanguageService
-     *
-     * @return \TYPO3\CMS\Core\Localization\LanguageService
-     */
-    protected function getLanguageService()
-    {
-        return $GLOBALS['LANG'];
-    }
-
-    /**
-     * Returns the current BE user.
-     *
-     * @return \TYPO3\CMS\Core\Authentication\BackendUserAuthentication
-     */
-    protected function getBackendUser()
-    {
-        return $GLOBALS['BE_USER'];
-    }
-}
diff --git a/typo3/sysext/wizard_crpages/LICENSE.txt b/typo3/sysext/wizard_crpages/LICENSE.txt
deleted file mode 100644 (file)
index 95d36a7..0000000
+++ /dev/null
@@ -1,345 +0,0 @@
-Some icons used in the TYPO3 project are retrieved from the "Silk" icon set of
-Mark James, which can be found at http://famfamfam.com/lab/icons/silk/. This
-set is distributed under a Creative Commons Attribution 2.5 License. The
-license can be found at http://creativecommons.org/licenses/by/2.5/.
----------------------------------
-
-                    GNU GENERAL PUBLIC LICENSE
-                       Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                            Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-                    GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-                            NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-                     END OF TERMS AND CONDITIONS
-
-            How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program 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.
-
-    This program 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.
-
-    You should have received a copy of the GNU General Public License along
-    with this program; if not, write to the Free Software Foundation, Inc.,
-    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) year name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.
diff --git a/typo3/sysext/wizard_crpages/Resources/Private/Language/locallang.xlf b/typo3/sysext/wizard_crpages/Resources/Private/Language/locallang.xlf
deleted file mode 100644 (file)
index f972d99..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
-       <file t3:id="1415815013" source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:37Z" product-name="wizard_crpages">
-               <header/>
-               <body>
-                       <trans-unit id="wiz_crMany">
-                               <source>Create multiple pages</source>
-                       </trans-unit>
-                       <trans-unit id="wiz_W">
-                               <source>W!</source>
-                       </trans-unit>
-                       <trans-unit id="wiz_newPages">
-                               <source>Create new pages</source>
-                       </trans-unit>
-                       <trans-unit id="wiz_newPages_page">
-                               <source>Page</source>
-                       </trans-unit>
-                       <trans-unit id="wiz_newPages_currentMenu">
-                               <source>New page structure</source>
-                       </trans-unit>
-                       <trans-unit id="wiz_newPages_errorMsg1">
-                               <source>You are not allowed to create new subpages to this page!</source>
-                       </trans-unit>
-                       <trans-unit id="wiz_newPages_lCreate">
-                               <source>Create pages</source>
-                       </trans-unit>
-                       <trans-unit id="wiz_newPages_listEnd">
-                               <source>Place new pages after the existing subpages</source>
-                       </trans-unit>
-                       <trans-unit id="wiz_newPages_hidePages">
-                               <source>Hide new pages</source>
-                       </trans-unit>
-                       <trans-unit id="wiz_newPages_hidePagesInMenus">
-                           <source>Hide new pages in menus</source>
-                       </trans-unit>
-                       <trans-unit id="wiz_newPages_lCreate_msg1">
-                               <source>You're about to create many new pages. Are you sure you want to continue?</source>
-                       </trans-unit>
-                       <trans-unit id="wiz_newPages_lReset">
-                               <source>Clear fields</source>
-                       </trans-unit>
-                       <trans-unit id="wiz_newPages_noCreate">
-                               <source>No pages were created!</source>
-                       </trans-unit>
-                       <trans-unit id="wiz_newPages_create">
-                               <source>The pages were created!</source>
-                       </trans-unit>
-                       <trans-unit id="wiz_newPages_addMoreLines">
-                               <source>Add more lines</source>
-                       </trans-unit>
-               </body>
-       </file>
-</xliff>
diff --git a/typo3/sysext/wizard_crpages/Resources/Private/Language/locallang_csh.xlf b/typo3/sysext/wizard_crpages/Resources/Private/Language/locallang_csh.xlf
deleted file mode 100644 (file)
index 2fbdcff..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
-       <file t3:id="1415815014" source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:37Z" product-name="wizard_crpages">
-               <header/>
-               <body>
-                       <trans-unit id="tx_wizardcrpages.alttitle">
-                               <source>Create Pages wizard</source>
-                       </trans-unit>
-                       <trans-unit id="tx_wizardcrpages.description" xml:space="preserve">
-                               <source>Enables you to create a batch of new, empty pages for quickly building up a new page tree.
-Just enter the titles for the pages you need. Only filled in fields will be created as pages.</source>
-                       </trans-unit>
-                       <trans-unit id="tx_wizardcrpages.details" xml:space="preserve">
-                               <source>The new pages will always be created as subpages to the currently active page from the page tree. This page is shown in the top of the page. In the example image below it is "/Intro/Startpage/".
-
-&lt;b&gt;"Place new pages after the existing subpages"&lt;/b&gt;
-If you select this option the pages will be create &lt;em&gt;after&lt;/em&gt; any existing subpages.
-
-&lt;b&gt;"Hide new pages"&lt;/b&gt;
-Select this if the new pages should be hidden by default. This option may be forced upon you if you do not have credentials to create new, online pages.
-
-
-&lt;b&gt;Lorem Ipsum...&lt;/b&gt;
-The Create new page wizard supports the Lorem Ipsum extension providing dummy content for the fields.</source>
-                       </trans-unit>
-                       <trans-unit id="_tx_wizardcrpages.seeAlso">
-                               <source>xEXT_loremipsum</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>
-                       <trans-unit id="_tx_wizardcrpages.image" xml:space="preserve">
-                               <source>EXT:wizard_crpages/Resources/Public/Images/cshimages/wizards_1.png,
-EXT:wizard_crpages/Resources/Public/Images/cshimages/wizards_2.png</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>
-                       <trans-unit id="tx_wizardcrpages.image_descr" xml:space="preserve">
-                               <source>You simply enter the new page titles in the fields. Only fields you fill in will be created as pages.
-After pressing the "Create pages" button the page tree to the left will update instantly, showing you the position of the new pages!</source>
-                       </trans-unit>
-               </body>
-       </file>
-</xliff>
diff --git a/typo3/sysext/wizard_crpages/Resources/Private/Templates/CreatePagesWizard.html b/typo3/sysext/wizard_crpages/Resources/Private/Templates/CreatePagesWizard.html
deleted file mode 100644 (file)
index 8f55b1b..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-<f:be.pageRenderer includeRequireJsModules="{0:'TYPO3/CMS/WizardCrpages/WizardCreatePages'}" />
-<h1><f:translate key="{LLPrefix}wiz_crMany"/></h1>
-<div>
-    <f:if condition="{pages}">
-        <f:then>
-            <div class="form-group">
-                <h4><f:translate key="{LLPrefix}wiz_newPages_currentMenu"/></h4>
-                <f:for each="{pages}" as="page">
-                    <f:render section="Page" arguments="{page: page}" />
-                </f:for>
-            </div>
-        </f:then>
-        <f:else>
-            <h4><f:translate key="{LLPrefix}wiz_newPages"/>:</h4>
-            <div class="form-group t3js-wizardcrpages-container">
-                <f:render section="FormLine" arguments="{line: {index: '0', label: '1', llprefix: '{LLPrefix}', typeselect: '{typeSelect}'}}" />
-                <f:render section="FormLine" arguments="{line: {index: '1', label: '2', llprefix: '{LLPrefix}', typeselect: '{typeSelect}'}}" />
-                <f:render section="FormLine" arguments="{line: {index: '2', label: '3', llprefix: '{LLPrefix}', typeselect: '{typeSelect}'}}" />
-                <f:render section="FormLine" arguments="{line: {index: '3', label: '4', llprefix: '{LLPrefix}', typeselect: '{typeSelect}'}}" />
-                <f:render section="FormLine" arguments="{line: {index: '4', label: '5', llprefix: '{LLPrefix}', typeselect: '{typeSelect}'}}" />
-            </div>
-        </f:else>
-    </f:if>
-    <div class="form-group">
-        <input class="btn btn-default t3js-wizardcrpages-createnewfields" type="button" value="{f:translate(key: '{LLPrefix}wiz_newPages_addMoreLines')}" />
-    </div>
-    <div class="form-group">
-        <div class="checkbox">
-            <label for="createInListEnd">
-                <input type="checkbox" name="createInListEnd" id="createInListEnd" value="1" />
-                {f:translate(key: '{LLPrefix}wiz_newPages_listEnd')}
-            </label>
-        </div>
-        <div class="checkbox">
-            <label for="hidePages">
-                <input type="checkbox" name="hidePages" id="hidePages" value="1" />
-                {f:translate(key: '{LLPrefix}wiz_newPages_hidePages')}
-            </label>
-        </div>
-        <div class="checkbox">
-            <label for="hidePagesInMenus">
-                <input type="checkbox" name="hidePagesInMenus" id="hidePagesInMenus" value="1" />
-                {f:translate(key: '{LLPrefix}wiz_newPages_hidePagesInMenus')}
-            </label>
-        </div>
-    </div>
-    <div class="form-group">
-        <input class="btn btn-default" type="submit" name="create" value="{f:translate(key: '{LLPrefix}wiz_newPages_lCreate')}" />
-        <input class="btn btn-default" type="reset" value="{f:translate(key: '{LLPrefix}wiz_newPages_lReset')}" />
-    </div>
-
-    <f:if condition="{cshItem}">
-        <span class="btn btn-default btn-sm">{cshItem -> f:format.raw()}</span>
-    </f:if>
-</div>
-
-<script type="text/javascript">
-    var tpl = `<f:render section="FormLine" arguments="{line: {index: '[0]', label: '[1]', llprefix: '{LLPrefix}', typeselect: '{typeSelect}'}}" />`, i, line, div, bg, label;
-</script>
-
-<f:section name="Page">
-    <span class="text-nowrap" title="{page.titleAttribute}">
-        <core:iconForRecord table="pages" row="{page.record}" />{page.title}<br />
-    </span>
-</f:section>
-
-<f:section name="FormLine">
-    <div class="form-section" id="form-line-{line.index}">
-        <div class="row">
-            <div class="form-group col-xs-8">
-                <label for="page_new_{line.index}">
-                    <f:translate key="{line.llprefix}wiz_newPages_page"/> {line.label}:
-                </label>
-                <div class="form-control-wrap">
-                    <input class="form-control" type="text" id="page_new_{line.index}" name="data[pages][NEW{line.index}][title]" />
-                </div>
-            </div>
-            <div class="form-group col-xs-4">
-                <label for="page_new_select_{line.index}">
-                    <f:translate key="LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.type"/>
-                </label>
-                <div class="form-control-wrap">
-                    <div class="input-group">
-                        <div id="page_new_icon_{line.index}" class="input-group-addon input-group-icon">
-                            <core:iconForRecord table="pages" row="{id: '0'}" />
-                        </div>
-                        <select id="page_new_select_{line.index}" class="form-control form-control-adapt t3js-wizardcrpages-select-doktype" name="data[pages][NEW{line.index}][doktype]" data-target="#page_new_icon_{line.index}">
-                            <f:for each="{line.typeselect}" as="typegroup" key="group">
-                                <optgroup label="{f:translate(key: '{group}')}">
-                                    <f:for each="{typegroup}" as="type">
-                                        <option data-icon='{core:icon(identifier: "{type.2}")}' value="{type.1}">{f:translate(key: '{type.0}')}</option>
-                                    </f:for>
-                                </optgroup>
-                            </f:for>
-                        </select>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-</f:section>
diff --git a/typo3/sysext/wizard_crpages/Resources/Public/Icons/Extension.png b/typo3/sysext/wizard_crpages/Resources/Public/Icons/Extension.png
deleted file mode 100644 (file)
index 4f140d9..0000000
Binary files a/typo3/sysext/wizard_crpages/Resources/Public/Icons/Extension.png and /dev/null differ
diff --git a/typo3/sysext/wizard_crpages/Resources/Public/Images/cshimages/wizards_1.png b/typo3/sysext/wizard_crpages/Resources/Public/Images/cshimages/wizards_1.png
deleted file mode 100644 (file)
index 4867f69..0000000
Binary files a/typo3/sysext/wizard_crpages/Resources/Public/Images/cshimages/wizards_1.png and /dev/null differ
diff --git a/typo3/sysext/wizard_crpages/Resources/Public/Images/cshimages/wizards_2.png b/typo3/sysext/wizard_crpages/Resources/Public/Images/cshimages/wizards_2.png
deleted file mode 100644 (file)
index 695c574..0000000
Binary files a/typo3/sysext/wizard_crpages/Resources/Public/Images/cshimages/wizards_2.png and /dev/null differ
diff --git a/typo3/sysext/wizard_crpages/Resources/Public/JavaScript/WizardCreatePages.js b/typo3/sysext/wizard_crpages/Resources/Public/JavaScript/WizardCreatePages.js
deleted file mode 100644 (file)
index bbbf94d..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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!
- */
-
-/**
- * Module: TYPO3/CMS/WizardCrpages/WizardCreatePages
- * JavaScript functions for creating multiple pages
- */
-define(['jquery'], function($) {
-       'use strict';
-
-       /**
-        *
-        * @type {{lineCounter: number, containerSelector: string, addMoreFieldsButtonSelector: string, doktypeSelector: string}}
-        * @exports TYPO3/CMS/WizardCrpages/WizardCreatePages
-        */
-       var WizardCreatePages = {
-               lineCounter: 5,
-               containerSelector: '.t3js-wizardcrpages-container',
-               addMoreFieldsButtonSelector: '.t3js-wizardcrpages-createnewfields',
-               doktypeSelector: '.t3js-wizardcrpages-select-doktype'
-       };
-
-       /**
-        *
-        */
-       WizardCreatePages.createNewFormFields = function() {
-               for (var i = 0; i < 5; i++) {
-                       var label = WizardCreatePages.lineCounter + i + 1;
-                       var line = tpl
-                               .replace(/\[0\]/g, (WizardCreatePages.lineCounter + i))
-                               .replace(/\[1\]/g, label);
-
-                       $(line).appendTo(WizardCreatePages.containerSelector);
-               }
-               WizardCreatePages.lineCounter += 5;
-       };
-
-       /**
-        *
-        * @param {Object} $selectElement
-        */
-       WizardCreatePages.actOnTypeSelectChange = function($selectElement) {
-               var $optionElement = $selectElement.find(':selected');
-               var $target = $($selectElement.data('target'));
-               $target.html($optionElement.data('icon'));
-       };
-
-       /**
-        * Register listeners
-        */
-       WizardCreatePages.initializeEvents = function() {
-               $(WizardCreatePages.addMoreFieldsButtonSelector).on('click', function() {
-                       WizardCreatePages.createNewFormFields();
-               });
-
-               $(document).on('change', WizardCreatePages.doktypeSelector, function() {
-                       WizardCreatePages.actOnTypeSelectChange($(this));
-               });
-       };
-
-       $(WizardCreatePages.initializeEvents);
-
-       return WizardCreatePages;
-});
diff --git a/typo3/sysext/wizard_crpages/composer.json b/typo3/sysext/wizard_crpages/composer.json
deleted file mode 100644 (file)
index c806f28..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-{
-       "name": "typo3/cms-wizard-crpages",
-       "type": "typo3-cms-framework",
-       "description": "TYPO3 Core",
-       "homepage": "https://typo3.org",
-       "license": ["GPL-2.0+"],
-
-       "require": {
-               "typo3/cms-core": "*"
-       },
-       "replace": {
-               "wizard_crpages": "*"
-       },
-       "extra": {
-               "typo3/cms": {
-                       "Package": {
-                               "partOfFactoryDefault": true
-                       }
-               }
-       },
-       "autoload": {
-               "psr-4": {
-                       "TYPO3\\CMS\\WizardCrpages\\": "Classes/"
-               }
-       }
-}
diff --git a/typo3/sysext/wizard_crpages/ext_emconf.php b/typo3/sysext/wizard_crpages/ext_emconf.php
deleted file mode 100644 (file)
index 8c176c1..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-$EM_CONF[$_EXTKEY] = [
-    'title' => 'Web>Functions: Create multiple pages',
-    'description' => 'A little utility to create many empty pages in one batch. Great for making a quick page structure.',
-    'category' => 'module',
-    'state' => 'stable',
-    'uploadfolder' => 0,
-    'createDirs' => '',
-    'clearCacheOnLoad' => 0,
-    'author' => 'Kasper Skaarhoj',
-    'author_email' => 'kasperYYYY@typo3.com',
-    'author_company' => 'Curby Soft Multimedia',
-    'version' => '9.0.0',
-    'constraints' => [
-        'depends' => [
-            'typo3' => '9.0.0-9.0.99',
-            'func' => '9.0.0-9.0.99',
-        ],
-        'conflicts' => [],
-        'suggests' => [],
-    ],
-];
diff --git a/typo3/sysext/wizard_crpages/ext_tables.php b/typo3/sysext/wizard_crpages/ext_tables.php
deleted file mode 100644 (file)
index 41843a0..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-defined('TYPO3_MODE') or die();
-
-if (TYPO3_MODE === 'BE') {
-    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction(
-        'web_func',
-        \TYPO3\CMS\WizardCrpages\Controller\CreatePagesWizardModuleFunctionController::class,
-        null,
-        'LLL:EXT:wizard_crpages/Resources/Private/Language/locallang.xlf:wiz_crMany'
-    );
-
-    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr(
-        '_MOD_web_func',
-        'EXT:wizard_crpages/Resources/Private/Language/locallang_csh.xlf'
-    );
-}
diff --git a/typo3/sysext/wizard_sortpages/Classes/View/SortPagesWizardModuleFunction.php b/typo3/sysext/wizard_sortpages/Classes/View/SortPagesWizardModuleFunction.php
deleted file mode 100644 (file)
index c2039a0..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-<?php
-namespace TYPO3\CMS\WizardSortpages\View;
-
-/*
- * 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!
- */
-
-use TYPO3\CMS\Backend\Utility\BackendUtility;
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Messaging\FlashMessageService;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Fluid\View\StandaloneView;
-
-/**
- * Creates the "Sort pages" wizard
- */
-class SortPagesWizardModuleFunction extends \TYPO3\CMS\Backend\Module\AbstractFunctionModule
-{
-    /**
-     * Main function creating the content for the module.
-     *
-     * @return string HTML content for the module, actually a "section" made through the parent object in $this->pObj
-     */
-    public function main()
-    {
-        $assigns = [];
-        $assigns['LLPrefix'] = 'LLL:EXT:wizard_sortpages/Resources/Private/Language/locallang.xlf:';
-        $assigns['workspace'] = $this->getBackendUser()->workspace;
-        if ($this->getBackendUser()->workspace === 0) {
-            // Check if user has modify permissions to
-            $sys_pages = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\Page\PageRepository::class);
-            $sortByField = GeneralUtility::_GP('sortByField');
-            if ($sortByField) {
-                $menuItems = [];
-                if ($sortByField === 'title' || $sortByField === 'subtitle' || $sortByField === 'crdate' || $sortByField === 'tstamp') {
-                    $menuItems = $sys_pages->getMenu($this->pObj->id, 'uid,pid,title', $sortByField, '', false);
-                } elseif ($sortByField === 'REV') {
-                    $menuItems = $sys_pages->getMenu($this->pObj->id, 'uid,pid,title', 'sorting', '', false);
-                    $menuItems = array_reverse($menuItems);
-                }
-                if (!empty($menuItems)) {
-                    $tce = GeneralUtility::makeInstance(\TYPO3\CMS\Core\DataHandling\DataHandler::class);
-                    $menuItems = array_reverse($menuItems);
-                    $cmd = [];
-                    foreach ($menuItems as $r) {
-                        $cmd['pages'][$r['uid']]['move'] = $this->pObj->id;
-                    }
-                    $tce->start([], $cmd);
-                    $tce->process_cmdmap();
-                    BackendUtility::setUpdateSignal('updatePageTree');
-                }
-            }
-            $menuItems = $sys_pages->getMenu($this->pObj->id, '*', 'sorting', '', false);
-            $assigns['menuItems'] = $menuItems;
-            if (!empty($menuItems)) {
-                $dataLines = [];
-                foreach ($menuItems as $rec) {
-                    $m_perms_clause = $this->getBackendUser()->getPagePermsClause(2);
-                    // edit permissions for that page!
-                    $pRec = BackendUtility::getRecord('pages', $rec['uid'], 'uid', ' AND ' . $m_perms_clause);
-                    $line = [];
-                    $line['rec'] = $rec;
-                    $line['danger'] = !is_array($pRec);
-                    $line['title'] = GeneralUtility::fixed_lgd_cs($rec['title'], $GLOBALS['BE_USER']->uc['titleLen']);
-                    $line['subtitle'] = GeneralUtility::fixed_lgd_cs($rec['subtitle'], $this->getBackendUser()->uc['titleLen']);
-                    $line['tstamp'] = BackendUtility::datetime($rec['tstamp']);
-                    $line['crdate'] = BackendUtility::datetime($rec['crdate']);
-                    $dataLines[] = $line;
-                }
-                $assigns['lines'] = $dataLines;
-
-                // Menu:
-                $dataLines = [];
-                $line = [];
-                $line['title'] = 'wiz_changeOrder_title';
-                $line['href'] = BackendUtility::getModuleUrl('web_func',
-                    [
-                        'id' => $GLOBALS['SOBE']->id,
-                        'sortByField' => 'title'
-                    ]
-                );
-                $dataLines[] = $line;
-                $line['title'] = 'wiz_changeOrder_subtitle';
-                $line['href'] = BackendUtility::getModuleUrl('web_func',
-                    [
-                        'id' => $GLOBALS['SOBE']->id,
-                        'sortByField' => 'subtitle'
-                    ]
-                );
-                $dataLines[] = $line;
-                $line['title'] = 'wiz_changeOrder_tChange';
-                $line['href'] = BackendUtility::getModuleUrl('web_func',
-                    [
-                        'id' => $GLOBALS['SOBE']->id,
-                        'sortByField' => 'tstamp'
-                    ]
-                );
-                $dataLines[] = $line;
-                $line['title'] = 'wiz_changeOrder_tCreate';
-                $line['href'] = BackendUtility::getModuleUrl('web_func',
-                    [
-                        'id' => $GLOBALS['SOBE']->id,
-                        'sortByField' => 'crdate'
-                    ]
-                );
-                $dataLines[] = $line;
-                $line['title'] = 'wiz_changeOrder_REVERSE';
-                $line['href'] = BackendUtility::getModuleUrl('web_func',
-                    [
-                        'id' => $GLOBALS['SOBE']->id,
-                        'sortByField' => 'REV'
-                    ]
-                );
-                $dataLines[] = $line;
-                $assigns['buttons'] = $dataLines;
-            } else {
-                $lang = $this->getLanguageService();
-                $lang->includeLLFile('EXT:wizard_sortpages/Resources/Private/Language/locallang.xlf');
-                $flashMessage = GeneralUtility::makeInstance(FlashMessage::class, $lang->getLL('no_subpages'), '', FlashMessage::NOTICE);
-                /** @var $flashMessageService \TYPO3\CMS\Core\Messaging\FlashMessageService */
-                $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
-                /** @var $defaultFlashMessageQueue \TYPO3\CMS\Core\Messaging\FlashMessageQueue */
-                $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
-                $defaultFlashMessageQueue->enqueue($flashMessage);
-            }
-            // CSH:
-            $assigns['cshItem'] = BackendUtility::cshItem('_MOD_web_func', 'tx_wizardsortpages');
-        }
-        // Rendering of the output via fluid
-        $view = GeneralUtility::makeInstance(StandaloneView::class);
-        $view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName(
-            'EXT:wizard_sortpages/Resources/Private/Templates/SortPagesWizard.html'
-        ));
-        $view->assignMultiple($assigns);
-        return $view->render();
-    }
-
-    /**
-     * Returns LanguageService
-     *
-     * @return \TYPO3\CMS\Core\Localization\LanguageService
-     */
-    protected function getLanguageService()
-    {
-        return $GLOBALS['LANG'];
-    }
-
-    /**
-     * Returns the current BE user.
-     *
-     * @return \TYPO3\CMS\Core\Authentication\BackendUserAuthentication
-     */
-    protected function getBackendUser()
-    {
-        return $GLOBALS['BE_USER'];
-    }
-}
diff --git a/typo3/sysext/wizard_sortpages/LICENSE.txt b/typo3/sysext/wizard_sortpages/LICENSE.txt
deleted file mode 100644 (file)
index 95d36a7..0000000
+++ /dev/null
@@ -1,345 +0,0 @@
-Some icons used in the TYPO3 project are retrieved from the "Silk" icon set of
-Mark James, which can be found at http://famfamfam.com/lab/icons/silk/. This
-set is distributed under a Creative Commons Attribution 2.5 License. The
-license can be found at http://creativecommons.org/licenses/by/2.5/.
----------------------------------
-
-                    GNU GENERAL PUBLIC LICENSE
-                       Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                            Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-                    GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-                            NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-                     END OF TERMS AND CONDITIONS
-
-            How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program 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.
-
-    This program 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.
-
-    You should have received a copy of the GNU General Public License along
-    with this program; if not, write to the Free Software Foundation, Inc.,
-    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) year name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.
diff --git a/typo3/sysext/wizard_sortpages/Resources/Private/Language/locallang.xlf b/typo3/sysext/wizard_sortpages/Resources/Private/Language/locallang.xlf
deleted file mode 100644 (file)
index 6e982fa..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
-       <file t3:id="1415815015" source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:37Z" product-name="wizard_sortpages">
-               <header/>
-               <body>
-                       <trans-unit id="wiz_sort">
-                               <source>Sort pages</source>
-                       </trans-unit>
-                       <trans-unit id="wiz_W">
-                               <source>W!</source>
-                       </trans-unit>
-                       <trans-unit id="wiz_currentPageOrder">
-                               <source>Current page order</source>
-                       </trans-unit>
-                       <trans-unit id="wiz_changeOrder">
-                               <source>Sort these pages by</source>
-                       </trans-unit>
-                       <trans-unit id="wiz_changeOrder_title">
-                               <source>Page title</source>
-                       </trans-unit>
-                       <trans-unit id="wiz_changeOrder_subtitle">
-                               <source>Subtitle</source>
-                       </trans-unit>
-                       <trans-unit id="wiz_changeOrder_tCreate">
-                               <source>Create-time</source>
-                       </trans-unit>
-                       <trans-unit id="wiz_changeOrder_tChange">
-                               <source>Change-time</source>
-                       </trans-unit>
-                       <trans-unit id="wiz_changeOrder_REVERSE">
-                               <source>Reverse current order</source>
-                       </trans-unit>
-                       <trans-unit id="wiz_changeOrder_msg1">
-                               <source>You're about to change the order of the above pages. Are you sure you want to continue?</source>
-                       </trans-unit>
-                       <trans-unit id="no_subpages">
-                               <source>Please select a page with subpages.</source>
-                       </trans-unit>
-                       <trans-unit id="not_available_in_draft_workspace">
-                               <source>Sorry, this function is not available in the current draft workspace!</source>
-                       </trans-unit>
-               </body>
-       </file>
-</xliff>
diff --git a/typo3/sysext/wizard_sortpages/Resources/Private/Language/locallang_csh.xlf b/typo3/sysext/wizard_sortpages/Resources/Private/Language/locallang_csh.xlf
deleted file mode 100644 (file)
index 68db2aa..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
-       <file t3:id="1415815016" source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:37Z" product-name="wizard_sortpages">
-               <header/>
-               <body>
-                       <trans-unit id="tx_wizardsortpages.alttitle">
-                               <source>Sort Pages wizard</source>
-                       </trans-unit>
-                       <trans-unit id="tx_wizardsortpages.description">
-                               <source>Enables you to sort pages alphabetically by title, sub-title or by creation time etc. You can also reverse the order of pages in the page tree.</source>
-                       </trans-unit>
-                       <trans-unit id="tx_wizardsortpages.details" xml:space="preserve">
-                               <source>Pages in the page tree are always ordered manually. It is possible to move pages up and down etc. But this wizard gives you a quick way to change the manual order of sub-pages.
-
-Simply click one of the links in the bottom of the wizard screen:
-
-&lt;b&gt;Page title&lt;/b&gt;
-Will sort pages by their page title.
-
-&lt;b&gt;Subtitle&lt;/b&gt;
-Will sort page by their Subtitle field.
-
-&lt;b&gt;Change-time&lt;/b&gt;
-Will sort pages by the date they were last changed.
-
-&lt;b&gt;Create-time&lt;/b&gt;
-Will sort pages by their creation date.
-
-&lt;b&gt;Reverse current order&lt;/b&gt;
-Click this to reverse the current order. For example, if you want to sort pages alphabetically but in descending order you simply sort by title first and then reverse the order by clicking this.</source>
-                       </trans-unit>
-                       <trans-unit id="_tx_wizardsortpages.image">
-                               <source>EXT:wizard_sortpages/Resources/Public/Images/cshimages/wizards_1.png</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/wizard_sortpages/Resources/Private/Templates/SortPagesWizard.html b/typo3/sysext/wizard_sortpages/Resources/Private/Templates/SortPagesWizard.html
deleted file mode 100644 (file)
index 6865998..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-<f:be.pageRenderer includeRequireJsModules="{0:'TYPO3/CMS/Backend/Modal'}" />
-<h1><f:translate key="{LLPrefix}wiz_sort"/></h1>
-
-<div>
-    <f:if condition="{workspace}">
-        <f:then>
-            <f:translate key="{LLPrefix}not_available_in_draft_workspace"/>
-        </f:then>
-        <f:else>
-            <f:if condition="{menuItems}">
-                <h2><f:translate key="{LLPrefix}wiz_currentPageOrder"/></h2>
-                <div class="table-fit">
-                    <table class="table table-striped table-hover">
-                        <thead><tr>
-                        <th><f:translate key="{LLPrefix}wiz_changeOrder_title"/></th>
-                        <th><f:translate key="{LLPrefix}wiz_changeOrder_subtitle"/></th>
-                        <th><f:translate key="{LLPrefix}wiz_changeOrder_tChange"/></th>
-                        <th><f:translate key="{LLPrefix}wiz_changeOrder_tCreate"/></th>
-                        </tr></thead>
-                        <f:for each="{lines}" as="line">
-                            <tr><td class="text-nowrap"><core:iconForRecord table="pages" row="{line.rec}" />
-                                <f:if condition="{line.danger}">
-                                    <strong class="text-danger"><f:translate key="{LLPrefix}wiz_W"/></strong>&nbsp;
-                                </f:if>
-                                {line.title}</td>
-                                <td class="text-nowrap">{line.subtitle}</td>
-                                <td class="text-nowrap">{line.tstamp}</td>
-                                <td class="text-nowrap">{line.crdate}</td>
-                            </tr>
-                        </f:for>
-                    </table>
-                </div>
-                <h4><f:translate key="{LLPrefix}wiz_changeOrder"/></h4>
-                <p>
-                    <f:for each="{buttons}" as="button">
-                        <f:render section="Button" arguments="{button: button, LLPrefix: LLPrefix}" />
-                    </f:for>
-                </p>
-            </f:if>
-        </f:else>
-    </f:if>
-
-    <f:if condition="{cshItem}">
-        <span class="btn btn-default btn-sm">{cshItem -> f:format.raw()}</span>
-    </f:if>
-</div>
-
-<f:section name="Button">
-    <a class="btn btn-default t3js-modal-trigger"
-        href="{button.href}"
-        data-severity="warning"
-        data-title="{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_common.xlf:pleaseConfirm')}"
-        data-button-close-text="{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_common.xlf:cancel')}"
-        data-content="{f:translate(key: '{LLPrefix}wiz_changeOrder_msg1')}" >
-        <f:translate key="{LLPrefix}{button.title}"/></a>
-</f:section>
diff --git a/typo3/sysext/wizard_sortpages/Resources/Public/Icons/Extension.png b/typo3/sysext/wizard_sortpages/Resources/Public/Icons/Extension.png
deleted file mode 100644 (file)
index 4f140d9..0000000
Binary files a/typo3/sysext/wizard_sortpages/Resources/Public/Icons/Extension.png and /dev/null differ
diff --git a/typo3/sysext/wizard_sortpages/Resources/Public/Images/cshimages/wizards_1.png b/typo3/sysext/wizard_sortpages/Resources/Public/Images/cshimages/wizards_1.png
deleted file mode 100644 (file)
index 903bdba..0000000
Binary files a/typo3/sysext/wizard_sortpages/Resources/Public/Images/cshimages/wizards_1.png and /dev/null differ
diff --git a/typo3/sysext/wizard_sortpages/composer.json b/typo3/sysext/wizard_sortpages/composer.json
deleted file mode 100644 (file)
index fda0593..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-{
-       "name": "typo3/cms-wizard-sortpages",
-       "type": "typo3-cms-framework",
-       "description": "TYPO3 Core",
-       "homepage": "https://typo3.org",
-       "license": ["GPL-2.0+"],
-
-       "require": {
-               "typo3/cms-core": "*"
-       },
-       "replace": {
-               "wizard_sortpages": "*"
-       },
-       "extra": {
-               "typo3/cms": {
-                       "Package": {
-                               "partOfFactoryDefault": true
-                       }
-               }
-       },
-       "autoload": {
-               "psr-4": {
-                       "TYPO3\\CMS\\WizardSortpages\\": "Classes/"
-               }
-       }
-}
diff --git a/typo3/sysext/wizard_sortpages/ext_emconf.php b/typo3/sysext/wizard_sortpages/ext_emconf.php
deleted file mode 100644 (file)
index ffdcc7f..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-$EM_CONF[$_EXTKEY] = [
-    'title' => 'Web>Functions: Sort pages',
-    'description' => 'A little utility to rearrange the sorting order of pages in the backend.',
-    'category' => 'module',
-    'state' => 'stable',
-    'uploadfolder' => 0,
-    'createDirs' => '',
-    'clearCacheOnLoad' => 0,
-    'author' => 'Kasper Skaarhoj',
-    'author_email' => 'kasperYYYY@typo3.com',
-    'author_company' => 'Curby Soft Multimedia',
-    'version' => '9.0.0',
-    'constraints' => [
-        'depends' => [
-            'typo3' => '9.0.0-9.0.99',
-            'func' => '9.0.0-9.0.99',
-        ],
-        'conflicts' => [],
-        'suggests' => [],
-    ],
-];
diff --git a/typo3/sysext/wizard_sortpages/ext_tables.php b/typo3/sysext/wizard_sortpages/ext_tables.php
deleted file mode 100644 (file)
index 9e7b539..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-defined('TYPO3_MODE') or die();
-
-if (TYPO3_MODE === 'BE') {
-    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction(
-        'web_func',
-        \TYPO3\CMS\WizardSortpages\View\SortPagesWizardModuleFunction::class,
-        null,
-        'LLL:EXT:wizard_sortpages/Resources/Private/Language/locallang.xlf:wiz_sort'
-    );
-
-    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr(
-        '_MOD_web_func',
-        'EXT:wizard_sortpages/Resources/Private/Language/locallang_csh.xlf'
-    );
-}