[TASK] Move version selector view to EXT:compatibility7 77/51777/5
authorBenni Mack <benni@typo3.org>
Tue, 21 Feb 2017 07:01:24 +0000 (08:01 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Tue, 7 Mar 2017 06:19:20 +0000 (07:19 +0100)
The functionality for switching between versions and showing
all versions of a record is available through the clickmenu when
EXT:version, but not EXT:workspaces is installed.

It is only used on certain edge cases and therefor moved
to EXT:compatibility7.

Resolves: #79942
Releases: master
Change-Id: Ic54f6ff2641fcb25ab3984ebead44dc44d9d3834
Reviewed-on: https://review.typo3.org/51777
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
21 files changed:
typo3/sysext/backend/Classes/Template/DocumentTemplate.php
typo3/sysext/backend/Classes/Template/ModuleTemplate.php
typo3/sysext/compatibility7/Classes/ContextMenu/ItemProvider.php [new file with mode: 0644]
typo3/sysext/compatibility7/Classes/Controller/VersionModuleController.php [new file with mode: 0644]
typo3/sysext/compatibility7/Classes/View/VersionView.php [new file with mode: 0644]
typo3/sysext/compatibility7/Configuration/Backend/Routes.php [new file with mode: 0644]
typo3/sysext/compatibility7/Migrations/Code/ClassAliasMap.php
typo3/sysext/compatibility7/Resources/Private/Language/locallang_version.xlf [new file with mode: 0644]
typo3/sysext/compatibility7/Resources/Private/Templates/Version.html [new file with mode: 0644]
typo3/sysext/compatibility7/Resources/Public/JavaScript/ContextMenuActions.js [new file with mode: 0644]
typo3/sysext/compatibility7/ext_tables.php
typo3/sysext/core/Documentation/Changelog/8.0/Deprecation-72733-DeprecateMoreMethodsOfDocumentTemplate.rst
typo3/sysext/core/Documentation/Changelog/master/Important-79942-VersionSelectorViewMovedToCompatibility7.rst [new file with mode: 0644]
typo3/sysext/version/Classes/ContextMenu/ItemProvider.php [deleted file]
typo3/sysext/version/Classes/Controller/VersionModuleController.php [deleted file]
typo3/sysext/version/Classes/View/VersionView.php [deleted file]
typo3/sysext/version/Configuration/Backend/Routes.php [deleted file]
typo3/sysext/version/Resources/Private/Language/locallang.xlf [deleted file]
typo3/sysext/version/Resources/Private/Templates/version.html [deleted file]
typo3/sysext/version/Resources/Public/JavaScript/ContextMenuActions.js [deleted file]
typo3/sysext/version/ext_tables.php [deleted file]

index d8e5416..f62b379 100644 (file)
@@ -1228,9 +1228,10 @@ function jumpToUrl(URL) {
         GeneralUtility::logDeprecatedFunction();
         if (
                 ExtensionManagementUtility::isLoaded('version') &&
+                ExtensionManagementUtility::isLoaded('compatibility7') &&
                 !ExtensionManagementUtility::isLoaded('workspaces')
         ) {
-            $versionGuiObj = GeneralUtility::makeInstance(\TYPO3\CMS\Version\View\VersionView::class);
+            $versionGuiObj = GeneralUtility::makeInstance(\TYPO3\CMS\Compatibility7\View\VersionView::class);
             return $versionGuiObj->getVersionSelector($id, $noAction);
         }
     }
index 45d6fdd..0b3314b 100644 (file)
@@ -16,6 +16,7 @@ namespace TYPO3\CMS\Backend\Template;
 
 use TYPO3\CMS\Backend\Template\Components\DocHeaderComponent;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Compatibility7\View\VersionView;
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Core\Imaging\Icon;
 use TYPO3\CMS\Core\Imaging\IconFactory;
@@ -27,7 +28,6 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException;
 use TYPO3\CMS\Fluid\View\StandaloneView;
 use TYPO3\CMS\Lang\LanguageService;
-use TYPO3\CMS\Version\View\VersionView;
 
 /**
  * A class taking care of the "outer" HTML of a module, especially
@@ -585,10 +585,12 @@ class ModuleTemplate
      *
      * @return string
      * @internal
+     * @deprecated since TYPO3 v8, will be removed in TYPO3 v9
      */
     public function getVersionSelector($id, $noAction = false)
     {
         if (ExtensionManagementUtility::isLoaded('version')
+            && ExtensionManagementUtility::isLoaded('compatibility7')
             && !ExtensionManagementUtility::isLoaded('workspaces')
         ) {
             /**
diff --git a/typo3/sysext/compatibility7/Classes/ContextMenu/ItemProvider.php b/typo3/sysext/compatibility7/Classes/ContextMenu/ItemProvider.php
new file mode 100644 (file)
index 0000000..3ca4536
--- /dev/null
@@ -0,0 +1,111 @@
+<?php
+declare(strict_types=1);
+namespace TYPO3\CMS\Compatibility7\ContextMenu;
+
+/*
+ * 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\ContextMenu\ItemProviders\AbstractProvider;
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
+/**
+ * Context menu item provider for version module
+ */
+class ItemProvider extends AbstractProvider
+{
+    /**
+     * @var array
+     */
+    protected $itemsConfiguration = [
+        'versioning' => [
+            'type' => 'item',
+            'label' => 'LLL:EXT:compatibility7/Resources/Private/Language/locallang_version.xlf:title',
+            'iconIdentifier' => 'actions-version-page-open',
+            'callbackAction' => 'openVersionModule'
+        ]
+    ];
+
+    /**
+     * @return bool
+     */
+    public function canHandle(): bool
+    {
+        return isset($GLOBALS['TCA'][$this->table]) && $GLOBALS['TCA'][$this->table]['ctrl']['versioningWS'];
+    }
+
+    /**
+     * This needs to be lower than priority of the RecordProvider
+     *
+     * @return int
+     */
+    public function getPriority(): int
+    {
+        return 55;
+    }
+
+    /**
+     * Registers custom JS module with item onclick behaviour
+     *
+     * @param string $itemName
+     * @return array
+     */
+    protected function getAdditionalAttributes(string $itemName): array
+    {
+        $url = BackendUtility::getModuleUrl('web_txversionM1', ['table' => $this->table, 'uid' => $this->identifier]);
+        return [
+            'data-action-url' => htmlspecialchars($url),
+            'data-callback-module' => 'TYPO3/CMS/Compatibility7/ContextMenuActions'
+        ];
+    }
+
+    /**
+     * Adds import/export items to the "submenu" if available
+     *
+     * @param array $items
+     * @return array
+     */
+    public function addItems(array $items): array
+    {
+        $this->initDisabledItems();
+
+        if (isset($items['delete'])) {
+            $localItems = $this->prepareItems($this->itemsConfiguration);
+            $position = array_search('delete', array_keys($items), true);
+
+            $beginning = array_slice($items, 0, $position+1, true);
+            $end = array_slice($items, $position, null, true);
+
+            $items = $beginning + $localItems + $end;
+        }
+        return $items;
+    }
+
+    /**
+     * @param string $itemName
+     * @param string $type
+     * @return bool
+     */
+    protected function canRender(string $itemName, string $type): bool
+    {
+        if (in_array($itemName, $this->disabledItems, true)) {
+            return false;
+        }
+        $canRender = false;
+        switch ($itemName) {
+            case 'versioning':
+                $canRender = (int)$this->identifier > 0  && $this->backendUser->check('modules', 'web_txversionM1');
+                break;
+        }
+        return $canRender;
+    }
+}
diff --git a/typo3/sysext/compatibility7/Classes/Controller/VersionModuleController.php b/typo3/sysext/compatibility7/Classes/Controller/VersionModuleController.php
new file mode 100644 (file)
index 0000000..f30a040
--- /dev/null
@@ -0,0 +1,635 @@
+<?php
+namespace TYPO3\CMS\Compatibility7\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 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\Database\ConnectionPool;
+use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Utility\ArrayUtility;
+use TYPO3\CMS\Core\Utility\DiffUtility;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Lang\LanguageService;
+
+/**
+ * Versioning module, including workspace management
+ */
+class VersionModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
+{
+    /**
+     * Module configuration
+     *
+     * @var array
+     */
+    public $MCONF = [];
+
+    /**
+     * Module menu items
+     *
+     * @var array
+     */
+    public $MOD_MENU = [];
+
+    /**
+     * Module session settings
+     *
+     * @var array
+     */
+    public $MOD_SETTINGS = [];
+
+    /**
+     * document template object
+     *
+     * @var \TYPO3\CMS\Backend\Template\DocumentTemplate
+     */
+    public $doc;
+
+    /**
+     * @var string
+     */
+    public $content;
+
+    /**
+     * @var string
+     */
+    public $table;
+
+    /**
+     * @var string
+     */
+    public $details;
+
+    /**
+     * @var string
+     */
+    public $diffOnly;
+
+    /**
+     * @var int
+     */
+    public $uid;
+
+    /**
+     * @var array|bool
+     */
+    public $pageinfo;
+
+    /**
+     * @var bool
+     */
+    public $recordFound;
+
+    /**
+     * Accumulated content
+     *
+     * @var int
+     */
+    public $showWorkspaceCol = 0;
+
+    /**
+     * @var array
+     */
+    public $formatWorkspace_cache = [];
+
+    /**
+     * @var array
+     */
+    public $formatCount_cache = [];
+
+    /**
+     * @var array
+     */
+    public $targets = [];
+
+    /**
+     * Accumulation of online targets.
+     *
+     * @var string
+     */
+    public $pageModule = '';
+
+    /**
+     * Name of page module
+     *
+     * @var bool
+     */
+    public $publishAccess = false;
+
+    /**
+     * @var array
+     */
+    public $stageIndex = [];
+
+    /**
+     * @var array
+     */
+    public $recIndex = [];
+
+    /**
+     * @var string
+     */
+    public $REQUEST_URI = '';
+
+    /**
+     * The name of the module
+     *
+     * @var string
+     */
+    protected $moduleName = 'web_txversionM1';
+
+    /**
+     * ModuleTemplate object
+     *
+     * @var ModuleTemplate
+     */
+    protected $moduleTemplate;
+
+    /**
+     * Initialize language files
+     */
+    public function __construct()
+    {
+        $GLOBALS['SOBE'] = $this;
+        $this->getLanguageService()->includeLLFile('EXT:compatibility7/Resources/Private/Language/locallang_version.xlf');
+        $this->moduleTemplate = GeneralUtility::makeInstance(ModuleTemplate::class);
+    }
+
+    /**
+     * Initialize menu configuration
+     *
+     * @return void
+     */
+    public function menuConfig()
+    {
+        // CLEANSE SETTINGS
+        $this->MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, GeneralUtility::_GP('SET'), $this->moduleName, 'ses');
+    }
+
+    /**
+     * Main function of the module. Write the content to $this->content
+     *
+     * @return void
+     */
+    public function main()
+    {
+        // Template markers
+        $markers = [
+            'CSH' => '',
+            'FUNC_MENU' => '',
+            'WS_MENU' => '',
+            'CONTENT' => ''
+        ];
+        // Setting module configuration:
+        $this->MCONF['name'] = $this->moduleName;
+        $this->REQUEST_URI = str_replace('&sendToReview=1', '', GeneralUtility::getIndpEnv('REQUEST_URI'));
+        // Draw the header.
+        $this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
+        $this->doc->setModuleTemplate('EXT:compatibility7/Resources/Private/Templates/Version.html');
+
+        // Setting up the context sensitive menu:
+        $this->getPageRenderer()->loadJquery();
+        $this->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Backend/ContextMenu');
+        // Getting input data:
+        $this->id = (int)GeneralUtility::_GP('id');
+
+        // Record uid. Goes with table name to indicate specific record
+        $this->uid = (int)GeneralUtility::_GP('uid');
+        // // Record table. Goes with uid to indicate specific record
+        $this->table = GeneralUtility::_GP('table');
+
+        $this->details = GeneralUtility::_GP('details');
+        // Page id. If set, indicates activation from Web>Versioning module
+        $this->diffOnly = GeneralUtility::_GP('diffOnly');
+        // Flag. If set, shows only the offline version and with diff-view
+        // Force this setting:
+        $this->MOD_SETTINGS['expandSubElements'] = true;
+        $this->MOD_SETTINGS['diff'] = $this->details || $this->MOD_SETTINGS['diff'] ? 1 : 0;
+        // Reading the record:
+        $record = BackendUtility::getRecord($this->table, $this->uid);
+        if ($record['pid'] == -1) {
+            $record = BackendUtility::getRecord($this->table, $record['t3ver_oid']);
+        }
+        $this->recordFound = is_array($record);
+        $pidValue = $this->table === 'pages' ? $this->uid : $record['pid'];
+        // Checking access etc.
+        if ($this->recordFound && $GLOBALS['TCA'][$this->table]['ctrl']['versioningWS'] && !$this->id) {
+            $this->uid = $record['uid'];
+            // Might have changed if new live record was found!
+            // Access check!
+            // The page will show only if there is a valid page and if this page may be viewed by the user
+            $this->pageinfo = BackendUtility::readPageAccess($pidValue, $this->perms_clause);
+            $access = is_array($this->pageinfo) ? 1 : 0;
+            if ($pidValue && $access || $GLOBALS['BE_USER']->user['admin'] && !$pidValue) {
+                // If another page module was specified, replace the default Page module with the new one
+                $newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule'));
+                $this->pageModule = BackendUtility::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
+                // Setting publish access permission for workspace:
+                $this->publishAccess = $GLOBALS['BE_USER']->workspacePublishAccess($GLOBALS['BE_USER']->workspace);
+                $this->versioningMgm();
+            }
+            // Setting up the buttons and markers for docheader
+            $docHeaderButtons = $this->getButtons();
+            $markers['CSH'] = $docHeaderButtons['csh'];
+            $markers['FUNC_MENU'] = BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
+            $markers['CONTENT'] = $this->content;
+        } else {
+            // If no access or id value, create empty document
+            $this->content = '<h2>' . htmlspecialchars($this->getLanguageService()->getLL('clickAPage_header')) . '</h2><div>' . $this->getLanguageService()->getLL('clickAPage_content') . '</div>';
+            // Setting up the buttons and markers for docheader
+            $docHeaderButtons = $this->getButtons();
+            $markers['CONTENT'] = $this->content;
+        }
+        // Build the <body> for the module
+        $this->content = $this->doc->startPage($this->getLanguageService()->getLL('title'));
+        $this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
+        $this->content .= $this->doc->endPage();
+        $this->content = $this->doc->insertStylesAndJS($this->content);
+    }
+
+    /**
+     * Create the panel of buttons for submitting the form or otherwise perform operations.
+     *
+     * @return array All available buttons as an assoc. array
+     */
+    protected function getButtons()
+    {
+        $buttons = [
+            'csh' => '',
+            'view' => '',
+            'record_list' => '',
+            'shortcut' => ''
+        ];
+        // CSH
+        if ($this->recordFound && $GLOBALS['TCA'][$this->table]['ctrl']['versioningWS']) {
+            // View page
+            $buttons['view'] = '
+                               <a href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($this->pageinfo['uid'], '', BackendUtility::BEgetRootLine($this->pageinfo['uid']))) . '" title="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.showPage')) . '">
+                                       ' . $this->moduleTemplate->getIconFactory()->getIcon('actions-document-view', Icon::SIZE_SMALL)->render() . '
+                               </a>';
+            // Shortcut
+            if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
+                $buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->moduleName);
+            }
+            // If access to Web>List for user, then link to that module.
+            $buttons['record_list'] = '<a href="' . htmlspecialchars(BackendUtility::getModuleUrl(
+                'web_list',
+                [
+                    'id' => $this->pageinfo['uid'],
+                    'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')
+                ]
+            )) . '">' . $this->moduleTemplate->getIconFactory()->getIcon('actions-system-list-open', Icon::SIZE_SMALL)->render() . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.showList')) . '</a>';
+        }
+        return $buttons;
+    }
+
+    /******************************
+     *
+     * Versioning management
+     *
+     ******************************/
+    /**
+     * Management of versions for record
+     *
+     * @return void
+     */
+    public function versioningMgm()
+    {
+        $lang = $this->getLanguageService();
+        // Diffing:
+        $diff_1 = GeneralUtility::_POST('diff_1');
+        $diff_2 = GeneralUtility::_POST('diff_2');
+        $content = '';
+        if (GeneralUtility::_POST('do_diff')) {
+            $content .= '<div class="panel panel-space panel-default">';
+            $content .= '<div class="panel-heading">' . $lang->getLL('diffing') . '</div>';
+            if ($diff_1 && $diff_2) {
+                $diff_1_record = BackendUtility::getRecord($this->table, $diff_1);
+                $diff_2_record = BackendUtility::getRecord($this->table, $diff_2);
+                if (is_array($diff_1_record) && is_array($diff_2_record)) {
+                    $diffUtility = GeneralUtility::makeInstance(DiffUtility::class);
+                    $diffUtility->stripTags = false;
+                    $rows = [];
+                    $rows[] = '
+                                                                       <tr>
+                                                                               <th>' . $lang->getLL('fieldname') . '</th>
+                                                                               <th width="98%">' . $lang->getLL('coloredDiffView') . ':</th>
+                                                                       </tr>
+                                                               ';
+                    foreach ($diff_1_record as $fN => $fV) {
+                        if ($GLOBALS['TCA'][$this->table]['columns'][$fN] && $GLOBALS['TCA'][$this->table]['columns'][$fN]['config']['type'] !== 'passthrough' && $fN !== 't3ver_label') {
+                            if ((string)$diff_1_record[$fN] !== (string)$diff_2_record[$fN]) {
+                                $diffres = $diffUtility->makeDiffDisplay(
+                                    BackendUtility::getProcessedValue($this->table, $fN, $diff_2_record[$fN], 0, 1),
+                                    BackendUtility::getProcessedValue($this->table, $fN, $diff_1_record[$fN], 0, 1)
+                                );
+                                $rows[] = '
+                                                                       <tr>
+                                                                               <td>' . $fN . '</td>
+                                                                               <td width="98%">' . $diffres . '</td>
+                                                                       </tr>
+                                                               ';
+                            }
+                        }
+                    }
+                    if (count($rows) > 1) {
+                        $content .= '<div class="table-fit"><table class="table">' . implode('', $rows) . '</table></div>';
+                    } else {
+                        $content .= '<div class="panel-body">' . $lang->getLL('recordsMatchesCompletely') . '</div>';
+                    }
+                } else {
+                    $content .= '<div class="panel-body">' . $lang->getLL('errorRecordsNotFound') . '</div>';
+                }
+            } else {
+                $content .= '<div class="panel-body">' . $lang->getLL('errorDiffSources') . '</div>';
+            }
+            $content .= '</div>';
+        }
+        // Element:
+        $record = BackendUtility::getRecord($this->table, $this->uid);
+        $recTitle = BackendUtility::getRecordTitle($this->table, $record, true);
+        // Display versions:
+        $content .= '
+                       <form name="theform" action="' . str_replace('&sendToReview=1', '', $this->REQUEST_URI) . '" method="post">
+                               <div class="panel panel-space panel-default">
+                               <div class="panel-heading">' . $recTitle . '</div>
+                                       <div class="table-fit">
+                                               <table class="table">
+                                                       <thead>
+                                                               <tr>
+                                                                       <th colspan="2" class="col-icon"></th>
+                                                                       <th title="' . $lang->getLL('tblHeaderDesc_title') . '">' . $lang->getLL('tblHeader_title') . '</th>
+                                                                       <th title="' . $lang->getLL('tblHeaderDesc_uid') . '"><i>' . $lang->getLL('tblHeader_uid') . '</i></th>
+                                                                       <th title="' . $lang->getLL('tblHeaderDesc_t3ver_oid') . '"><i>' . $lang->getLL('tblHeader_t3ver_oid') . '</i></th>
+                                                                       <th title="' . $lang->getLL('tblHeaderDesc_t3ver_id') . '"><i>' . $lang->getLL('tblHeader_t3ver_id') . '</i></th>
+                                                                       <th title="' . $lang->getLL('tblHeaderDesc_t3ver_wsid') . '"><i>' . $lang->getLL('tblHeader_t3ver_wsid') . '</i></th>
+                                                                       <th title="' . htmlspecialchars($lang->getLL('tblHeaderDesc_t3ver_state')) . '"><i>' . $lang->getLL('tblHeader_t3ver_state') . '</i></th>
+                                                                       <th title="' . $lang->getLL('tblHeaderDesc_t3ver_stage') . '"><i>' . $lang->getLL('tblHeader_t3ver_stage') . '</i></th>
+                                                                       <th title="' . $lang->getLL('tblHeaderDesc_t3ver_count') . '"><i>' . $lang->getLL('tblHeader_t3ver_count') . '</i></th>
+                                                                       <th title="' . $lang->getLL('tblHeaderDesc_pid') . '"><i>' . $lang->getLL('tblHeader_pid') . '</i></th>
+                                                                       <th title="' . $lang->getLL('tblHeaderDesc_t3ver_label') . '"><i>' . $lang->getLL('tblHeader_t3ver_label') . '</i></th>
+                                                                       <th></th>
+                                                                       <th colspan="2">
+                                                                               <button class="btn btn-default btn-sm" type="submit"  name="do_diff" value="true">
+                                                                                       ' . $lang->getLL('diff') . '
+                                                                               </button>
+                                                                       </th>
+                                                               </tr>
+                                                       </thead>
+                                                       <tbody>
+                       ';
+        $versions = BackendUtility::selectVersionsOfRecord($this->table, $this->uid, '*', $GLOBALS['BE_USER']->workspace);
+        foreach ($versions as $row) {
+            $adminLinks = $this->adminLinks($this->table, $row);
+
+            $editUrl = BackendUtility::getModuleUrl('record_edit', [
+                'edit' => [
+                    $this->table => [
+                        $row['uid'] => 'edit'
+                    ]
+                ],
+                'columnsOnly' => 't3ver_label',
+                'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')
+            ]);
+            $content .= '
+                               <tr' . ($row['uid'] != $this->uid ? '' : ' class="active"') . '>
+                                       <td class="col-icon">' .
+                        ($row['uid'] != $this->uid ?
+                            '<a href="' . BackendUtility::getLinkToDataHandlerAction('&cmd[' . $this->table . '][' . $this->uid . '][version][swapWith]=' . $row['uid'] . '&cmd[' . $this->table . '][' . $this->uid . '][version][action]=swap') . '" title="' . htmlspecialchars($lang->getLL('swapWithCurrent')) . '">' . $this->moduleTemplate->getIconFactory()->getIcon('actions-version-swap-version', Icon::SIZE_SMALL)->render() . '</a>' :
+                            '<span title="' . htmlspecialchars($lang->getLL('currentOnlineVersion')) . '">' . $this->moduleTemplate->getIconFactory()->getIcon('status-status-current', Icon::SIZE_SMALL)->render() . '</span>'
+                        ) . '
+                                       </td>
+                                       <td class="col-icon">' . $this->moduleTemplate->getIconFactory()->getIconForRecord($this->table, $row, Icon::SIZE_SMALL)->render() . '</td>
+                                       <td>' . BackendUtility::getRecordTitle($this->table, $row, true) . '</td>
+                                       <td>' . $row['uid'] . '</td>
+                                       <td>' . $row['t3ver_oid'] . '</td>
+                                       <td>' . $row['t3ver_id'] . '</td>
+                                       <td>' . $row['t3ver_wsid'] . '</td>
+                                       <td>' . $row['t3ver_state'] . '</td>
+                                       <td>' . $row['t3ver_stage'] . '</td>
+                                       <td>' . $row['t3ver_count'] . '</td>
+                                       <td>' . $row['pid'] . '</td>
+                                       <td>
+                                               <a href="' . htmlspecialchars($editUrl) . '" title="' . htmlspecialchars($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:cm.edit')) . '">
+                                                       ' . $this->moduleTemplate->getIconFactory()->getIcon('actions-open', Icon::SIZE_SMALL)->render() . '
+                                               </a>' . htmlspecialchars($row['t3ver_label']) . '
+                                       </td>
+                                       <td class="col-control">' . $adminLinks . '</td>
+                                       <td class="text-center success"><input type="radio" name="diff_1" value="' . $row['uid'] . '"' . ($diff_1 == $row['uid'] ? ' checked="checked"' : '') . '/></td>
+                                       <td class="text-center danger"><input type="radio" name="diff_2" value="' . $row['uid'] . '"' . ($diff_2 == $row['uid'] ? ' checked="checked"' : '') . '/></td>
+                               </tr>';
+            // Show sub-content if the table is pages AND it is not the online branch (because that will mostly render the WHOLE tree below - not smart;)
+            if ($this->table === 'pages' && $row['uid'] != $this->uid) {
+                $sub = $this->pageSubContent($row['uid']);
+                if ($sub) {
+                    $content .= '
+                                               <tr>
+                                                       <td colspan="2"></td>
+                                                       <td colspan="11">' . $sub . '</td>
+                                                       <td class="success"></td>
+                                                       <td class="danger"></td>
+                                               </tr>';
+                }
+            }
+        }
+        $content .= '
+                                                       </tbody>
+                                               </table>
+                                       </div>
+                               </div>
+                       </form>';
+        $this->content .= '<h2>' . htmlspecialchars($lang->getLL('title')) . '</h2><div>' . $content . '</div>';
+        // Create new:
+        $content = '
+                       <form action="' . htmlspecialchars(BackendUtility::getModuleUrl('tce_db')) . '" method="post">
+                               <div class="row">
+                                       <div class="col-sm-6 col-md-4 col-lg-3">
+                                               <div class="form-group">
+                                                       <label for="typo3-new-version-label">' . $lang->getLL('tblHeader_t3ver_label') . '</label>
+                                                       <input id="typo3-new-version-label" class="form-control" type="text" name="cmd[' . $this->table . '][' . $this->uid . '][version][label]" />
+                                               </div>
+                                               <div class="form-group">
+                                                       <input type="hidden" name="cmd[' . $this->table . '][' . $this->uid . '][version][action]" value="new" />
+                                                       <input type="hidden" name="prErr" value="1" />
+                                                       <input type="hidden" name="redirect" value="' . htmlspecialchars($this->REQUEST_URI) . '" />
+                                                       <input class="btn btn-default" type="submit" name="_" value="' . $lang->getLL('createNewVersion') . '" />
+                                               </div>
+                                       </div>
+                               </div>
+                       </form>
+
+               ';
+        $this->content .= '<h2>' . htmlspecialchars($lang->getLL('createNewVersion')) . '</h2><div>' . $content . '</div>';
+    }
+
+    /**
+     * Recursively look for children for page version with $pid
+     *
+     * @param int $pid UID of page record for which to look up sub-elements following that version
+     * @param int $c Counter, do not set (limits to 100 levels)
+     * @return string Table with content if any
+     */
+    public function pageSubContent($pid, $c = 0)
+    {
+        $tableNames = ArrayUtility::removeArrayEntryByValue(array_keys($GLOBALS['TCA']), 'pages');
+        $tableNames[] = 'pages';
+        $content = '';
+        foreach ($tableNames as $table) {
+            // Basically list ALL tables - not only those being copied might be found!
+            $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
+                ->getQueryBuilderForTable($table);
+            $queryBuilder->getRestrictions()
+                ->removeAll()
+                ->add(GeneralUtility::makeInstance(DeletedRestriction::class));
+
+            $queryBuilder
+                ->select('*')
+                ->from($table)
+                ->where(
+                    $queryBuilder->expr()->eq(
+                        'pid',
+                        $queryBuilder->createNamedParameter($pid, \PDO::PARAM_INT)
+                    )
+                );
+
+            if (!empty($GLOBALS['TCA'][$table]['ctrl']['sortby'])) {
+                $queryBuilder->orderBy($GLOBALS['TCA'][$table]['ctrl']['sortby']);
+            }
+
+            $result = $queryBuilder->execute();
+            if ($result->rowCount()) {
+                $content .= '
+                                       <table class="table">
+                                               <tr>
+                                                       <th class="col-icon">' . $this->moduleTemplate->getIconFactory()->getIconForRecord($table, [], Icon::SIZE_SMALL)->render() . '</th>
+                                                       <th class="col-title">' . htmlspecialchars($this->getLanguageService()->sL($GLOBALS['TCA'][$table]['ctrl']['title'])) . '</th>
+                                                       <th></th>
+                                                       <th></th>
+                                               </tr>';
+                while ($subrow = $result->fetch()) {
+                    $ownVer = $this->lookForOwnVersions($table, $subrow['uid']);
+                    $content .= '
+                                               <tr>
+                                                       <td class="col-icon">' . $this->moduleTemplate->getIconFactory()->getIconForRecord($table, $subrow, Icon::SIZE_SMALL)->render() . '</td>
+                                                       <td class="col-title">' . BackendUtility::getRecordTitle($table, $subrow, true) . '</td>
+                                                       <td>' . ($ownVer > 1 ? '<a href="' . htmlspecialchars(BackendUtility::getModuleUrl('web_txversionM1', ['table' => $table, 'uid' => $subrow['uid']])) . '">' . ($ownVer - 1) . '</a>' : '') . '</td>
+                                                       <td class="col-control">' . $this->adminLinks($table, $subrow) . '</td>
+                                               </tr>';
+                    if ($table === 'pages' && $c < 100) {
+                        $sub = $this->pageSubContent($subrow['uid'], $c + 1);
+                        if ($sub) {
+                            $content .= '
+                                                               <tr>
+                                                                       <td></td>
+                                                                       <td></td>
+                                                                       <td></td>
+                                                                       <td width="98%">' . $sub . '</td>
+                                                               </tr>';
+                        }
+                    }
+                }
+                $content .= '</table>';
+            }
+        }
+        return $content;
+    }
+
+    /**
+     * Look for number of versions of a record
+     *
+     * @param string $table Table name
+     * @param int $uid Record uid
+     * @return int Number of versions for record, FALSE if none.
+     */
+    public function lookForOwnVersions($table, $uid)
+    {
+        $versions = BackendUtility::selectVersionsOfRecord($table, $uid, 'uid', null);
+        if (is_array($versions)) {
+            return count($versions);
+        }
+        return false;
+    }
+
+    /**
+     * Administrative links for a table / record
+     *
+     * @param string $table Table name
+     * @param array $row Record for which administrative links are generated.
+     * @return string HTML link tags.
+     */
+    public function adminLinks($table, $row)
+    {
+        // Edit link:
+        $editUrl = BackendUtility::getModuleUrl('record_edit', [
+            'edit' => [
+                $table => [
+                    $row['uid'] => 'edit'
+                ]
+            ],
+            'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')
+        ]);
+        $adminLink = '<div class="btn-group btn-group-sm" role="group">';
+        $adminLink .= '<a class="btn btn-default" href="' . htmlspecialchars($editUrl) . '" title="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:cm.edit')) . '">' . $this->moduleTemplate->getIconFactory()->getIcon('actions-open', Icon::SIZE_SMALL)->render() . '</a>';
+        // Delete link:
+        $adminLink .= '<a class="btn btn-default" href="' . htmlspecialchars(BackendUtility::getLinkToDataHandlerAction('&cmd[' . $table . '][' . $row['uid'] . '][delete]=1')) . '" title="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:cm.delete')) . '">' . $this->moduleTemplate->getIconFactory()->getIcon('actions-edit-delete', Icon::SIZE_SMALL)->render() . '</a>';
+        $adminLink .= '</div>';
+        if ($table === 'pages') {
+            // If another page module was specified, replace the default Page module with the new one
+            $newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule'));
+            $pageModule = BackendUtility::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
+            $adminLink .= '<div class="btn-group btn-group-sm">';
+            $adminLink .= '<a class="btn btn-default" href="#" onclick="top.loadEditId(' . $row['uid'] . ');top.goToModule(' . GeneralUtility::quoteJSvalue($pageModule) . '); return false;">'
+                . $this->moduleTemplate->getIconFactory()->getIcon('actions-page-open', Icon::SIZE_SMALL)->render()
+                . '</a>';
+            $adminLink .= '<a class="btn btn-default" href="#" onclick="top.loadEditId(' . $row['uid'] . ');top.goToModule(\'web_list\'); return false;">' . $this->moduleTemplate->getIconFactory()->getIcon('actions-system-list-open', Icon::SIZE_SMALL)->render() . '</a>';
+            // "View page" icon is added:
+            $adminLink .= '<a class="btn btn-default" href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($row['uid'], '', BackendUtility::BEgetRootLine($row['uid']))) . '">' . $this->moduleTemplate->getIconFactory()->getIcon('actions-document-view', Icon::SIZE_SMALL)->render() . '</a>';
+            $adminLink .= '</div>';
+        } else {
+            if ($row['pid'] == -1) {
+                $getVars = '&ADMCMD_vPrev[' . rawurlencode(($table . ':' . $row['t3ver_oid'])) . ']=' . $row['uid'];
+                // "View page" icon is added:
+                $adminLink .= '<div class="btn-group btn-group-sm" role="group"><a class="btn btn-default" href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($row['_REAL_PID'], '', BackendUtility::BEgetRootLine($row['_REAL_PID']), '', '', $getVars)) . '">' . $this->moduleTemplate->getIconFactory()->getIcon('actions-document-view', Icon::SIZE_SMALL)->render() . '</a></div>';
+            }
+        }
+        return $adminLink;
+    }
+
+    /**
+     * Injects the request object for the current request and gathers all data.
+     *
+     * @param ServerRequestInterface $request the current request
+     * @param ResponseInterface $response the prepared response
+     * @return ResponseInterface the response with the content
+     */
+    public function mainAction(ServerRequestInterface $request, ResponseInterface $response)
+    {
+        $this->init();
+        $this->main();
+
+        $response->getBody()->write($this->content);
+        return $response;
+    }
+
+    /**
+     * @return LanguageService
+     */
+    protected function getLanguageService()
+    {
+        return $GLOBALS['LANG'];
+    }
+}
diff --git a/typo3/sysext/compatibility7/Classes/View/VersionView.php b/typo3/sysext/compatibility7/Classes/View/VersionView.php
new file mode 100644 (file)
index 0000000..79a53e2
--- /dev/null
@@ -0,0 +1,119 @@
+<?php
+namespace TYPO3\CMS\Compatibility7\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\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Lang\LanguageService;
+
+/**
+ * Contains some parts for staging, versioning and workspaces
+ * to interact with the TYPO3 Core Engine
+ */
+class VersionView
+{
+    /**
+     * Creates the version selector for the page id inputted.
+     * Moved out of the core file \TYPO3\CMS\Backend\Template\DocumentTemplate
+     *
+     * @param int $id Page id to create selector for.
+     * @param bool $noAction If set, there will be no button for swapping page.
+     * @return string
+     * @see \TYPO3\CMS\Backend\Template\DocumentTemplate
+     */
+    public function getVersionSelector($id, $noAction = false)
+    {
+        if ($id <= 0) {
+            return '';
+        }
+        if ($GLOBALS['BE_USER']->workspace == 0) {
+            $lang = $this->getLanguageService();
+            // Get Current page record:
+            $curPage = BackendUtility::getRecord('pages', $id);
+            // If the selected page is not online, find the right ID
+            $onlineId = $curPage['pid'] == -1 ? $curPage['t3ver_oid'] : $id;
+            // Select all versions of online version:
+            $versions = BackendUtility::selectVersionsOfRecord('pages', $onlineId, 'uid,pid,t3ver_label,t3ver_oid,t3ver_wsid,t3ver_id', null);
+            // If more than one was found...:
+            if (count($versions) > 1) {
+                // Create selector box entries:
+                $opt = [];
+                foreach ($versions as $vRow) {
+                    if ($vRow['uid'] == $onlineId) {
+                        // Live version
+                        $label = '[' . htmlspecialchars($lang->sL('LLL:EXT:compatibility7/Resources/Private/Language/locallang_version.xlf:versionSelect.live')) . ']';
+                    } else {
+                        $label = $vRow['t3ver_label'] . ' (' . htmlspecialchars($lang->sL('LLL:EXT:compatibility7/Resources/Private/Language/locallang_version.xlf:versionId')) . ' ' . $vRow['t3ver_id'] . ($vRow['t3ver_wsid'] != 0 ? ' ' . htmlspecialchars($lang->sL('LLL:EXT:compatibility7/Resources/Private/Language/locallang_version.xlf:workspaceId')) . ' ' . $vRow['t3ver_wsid'] : '') . ')';
+                    }
+                    $opt[] = '<option value="' . htmlspecialchars(GeneralUtility::linkThisScript(['id' => $vRow['uid']])) . '"' . ($id == $vRow['uid'] ? ' selected="selected"' : '') . '>' . htmlspecialchars($label) . '</option>';
+                }
+                /** @var $iconFactory \TYPO3\CMS\Core\Imaging\IconFactory */
+                $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+                // Add management link:
+                $management = '
+                                       <a class="btn btn-default" href="' . htmlspecialchars(BackendUtility::getModuleUrl('web_txversionM1', ['table' => 'pages', 'uid' => $onlineId])) . '">
+                                               ' . $iconFactory->getIcon('actions-version-page-open', Icon::SIZE_SMALL)->render() . '
+                                               ' . htmlspecialchars($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:ver.mgm')) . '
+                                       </a>';
+                // Create onchange handler:
+                $onChange = 'window.location.href=this.options[this.selectedIndex].value;';
+                // Controls:
+                if ($id == $onlineId) {
+                    $controls = '<strong class="text-success">' . htmlspecialchars($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:ver.online')) . '</strong>';
+                } elseif (!$noAction) {
+                    $href = BackendUtility::getLinkToDataHandlerAction(
+                        '&cmd[pages][' . $onlineId . '][version][swapWith]=' . $id . '&cmd[pages][' . $onlineId . '][version][action]=swap',
+                        GeneralUtility::linkThisScript(['id' => $onlineId])
+                    );
+                    $controls = '
+                                               <a href="' . htmlspecialchars($href) . '" class="btn btn-default" title="' . htmlspecialchars($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:ver.swapPage')) . '">
+                                                       ' . $iconFactory->getIcon('actions-version-swap-version', Icon::SIZE_SMALL)->render() . '
+                                                       ' . htmlspecialchars($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:ver.swap')) . '
+                                               </a>';
+                }
+                // Write out HTML code:
+                return '
+                                       <!--
+                                               Version selector:
+                                       -->
+                                       <div id="typo3-version-selector" class="form-inline form-inline-spaced">
+                                               <div class="form-group">
+                                                       <label for="version-selector">' . htmlspecialchars($lang->sL('LLL:EXT:compatibility7/Resources/Private/Language/locallang_version.xlf:versionSelect.label')) . '</label>
+                                                       <select id="version-selector" class="form-control" onchange="' . htmlspecialchars($onChange) . '">
+                                                               ' . implode('', $opt) . '
+                                                       </select>
+                                               </div>
+                                               <div class="form-group">
+                                                       ' . $controls . '
+                                               </div>
+                                               <div class="form-group">
+                                                       ' . $management . '
+                                               </div>
+                                       </div>
+                               ';
+            }
+        }
+    }
+
+    /**
+     * @return LanguageService
+     */
+    protected function getLanguageService()
+    {
+        return $GLOBALS['LANG'];
+    }
+}
diff --git a/typo3/sysext/compatibility7/Configuration/Backend/Routes.php b/typo3/sysext/compatibility7/Configuration/Backend/Routes.php
new file mode 100644 (file)
index 0000000..f8dad7f
--- /dev/null
@@ -0,0 +1,12 @@
+<?php
+
+/**
+ * Definitions for routes previously provided by EXT:version
+ */
+return [
+    // Register version_click_module entry point
+    'web_txversionM1' => [
+        'path' => '/record/versions/',
+        'target' => \TYPO3\CMS\Compatibility7\Controller\VersionModuleController::class . '::mainAction'
+    ]
+];
index d5c76b5..c31620c 100644 (file)
@@ -1,4 +1,7 @@
 <?php
 return [
-    'TYPO3\\CMS\\IndexedSearch\\Controller\\SearchFormController' => \TYPO3\CMS\Compatibility7\Controller\SearchFormController::class
+    'TYPO3\\CMS\\IndexedSearch\\Controller\\SearchFormController' => \TYPO3\CMS\Compatibility7\Controller\SearchFormController::class,
+    'TYPO3\\CMS\\Version\\ContextMenu\\ItemProvider' => \TYPO3\CMS\Compatibility7\ContextMenu\ItemProvider::class,
+    'TYPO3\\CMS\\Version\\Controller\\VersionModuleController' => \TYPO3\CMS\Compatibility7\Controller\VersionModuleController::class,
+    'TYPO3\\CMS\\Version\\View\\VersionView' => \TYPO3\CMS\Compatibility7\View\VersionView::class
 ];
diff --git a/typo3/sysext/compatibility7/Resources/Private/Language/locallang_version.xlf b/typo3/sysext/compatibility7/Resources/Private/Language/locallang_version.xlf
new file mode 100644 (file)
index 0000000..a2eec1c
--- /dev/null
@@ -0,0 +1,374 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
+       <file t3:id="1415815009" source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:37Z" product-name="version">
+               <header/>
+               <body>
+                       <trans-unit id="title">
+                               <source>Versioning</source>
+                       </trans-unit>
+                       <trans-unit id="title_review">
+                               <source>Send to review/pub</source>
+                       </trans-unit>
+                       <trans-unit id="mlang_labels_tablabel">
+                               <source>Page and content versioning and workspace management for pages.</source>
+                       </trans-unit>
+                       <trans-unit id="mlang_labels_tabdescr">
+                               <source>The Web&gt;Versioning module provides access to versioning features for the page tree.</source>
+                       </trans-unit>
+                       <trans-unit id="mlang_tabs_tab">
+                               <source>Versioning</source>
+                       </trans-unit>
+                       <trans-unit id="clickAPage_header">
+                               <source>Web&gt;Versioning module</source>
+                       </trans-unit>
+                       <trans-unit id="clickAPage_content">
+                               <source>Please click a page in the pagetree frame to see the versioning module.</source>
+                       </trans-unit>
+                       <trans-unit id="filter_drafts">
+                               <source>Drafts</source>
+                       </trans-unit>
+                       <trans-unit id="filter_archive">
+                               <source>Archive</source>
+                       </trans-unit>
+                       <trans-unit id="filter_all">
+                               <source>All</source>
+                       </trans-unit>
+                       <trans-unit id="diffing">
+                               <source>DIFFING</source>
+                       </trans-unit>
+                       <trans-unit id="fieldname">
+                               <source>Fieldname</source>
+                       </trans-unit>
+                       <trans-unit id="coloredDiffView">
+                               <source>Colored diff-view</source>
+                       </trans-unit>
+                       <trans-unit id="recordsMatchesCompletely">
+                               <source>Records matches completely on all editable fields!</source>
+                       </trans-unit>
+                       <trans-unit id="errorRecordsNotFound">
+                               <source>ERROR: Records could strangely not be found!</source>
+                       </trans-unit>
+                       <trans-unit id="errorDiffSources">
+                               <source>ERROR: You didn't select two sources for diffing!</source>
+                       </trans-unit>
+                       <trans-unit id="tblHeader_title">
+                               <source>Title</source>
+                       </trans-unit>
+                       <trans-unit id="tblHeader_uid">
+                               <source>UID</source>
+                       </trans-unit>
+                       <trans-unit id="tblHeader_t3ver_oid">
+                               <source>oid</source>
+                       </trans-unit>
+                       <trans-unit id="tblHeader_t3ver_id">
+                               <source>id</source>
+                       </trans-unit>
+                       <trans-unit id="tblHeader_t3ver_wsid">
+                               <source>wsid</source>
+                       </trans-unit>
+                       <trans-unit id="tblHeader_t3ver_state">
+                               <source>state</source>
+                       </trans-unit>
+                       <trans-unit id="tblHeader_t3ver_stage">
+                               <source>stage</source>
+                       </trans-unit>
+                       <trans-unit id="tblHeader_t3ver_count">
+                               <source>count</source>
+                       </trans-unit>
+                       <trans-unit id="tblHeader_pid">
+                               <source>pid</source>
+                       </trans-unit>
+                       <trans-unit id="tblHeader_t3ver_label">
+                               <source>Label</source>
+                       </trans-unit>
+                       <trans-unit id="tblHeaderDesc_title">
+                               <source>Header of element</source>
+                       </trans-unit>
+                       <trans-unit id="tblHeaderDesc_uid">
+                               <source>Unique ID of element</source>
+                       </trans-unit>
+                       <trans-unit id="tblHeaderDesc_t3ver_oid">
+                               <source>t3ver_oid - Reference to live version UID</source>
+                       </trans-unit>
+                       <trans-unit id="tblHeaderDesc_t3ver_id">
+                               <source>t3ver_id - Version number, incremental integer</source>
+                       </trans-unit>
+                       <trans-unit id="tblHeaderDesc_t3ver_wsid">
+                               <source>t3ver_wsid - Workspace ID. There can be only one version of an element per ID (except ID zero).</source>
+                       </trans-unit>
+                       <trans-unit id="tblHeaderDesc_t3ver_state">
+                               <source>t3ver_state - Special states of a version: 1=Placeholder for "New". 2=Marked deleted.</source>
+                       </trans-unit>
+                       <trans-unit id="tblHeaderDesc_t3ver_stage">
+                               <source>t3ver_stage - Publishing stage: Editing (0), review (1), publish (10), rejected (-1).</source>
+                       </trans-unit>
+                       <trans-unit id="tblHeaderDesc_t3ver_count">
+                               <source>t3ver_count - Life cycle counter. Incremented each time element is unpublished.</source>
+                       </trans-unit>
+                       <trans-unit id="tblHeaderDesc_pid">
+                               <source>Page ID</source>
+                       </trans-unit>
+                       <trans-unit id="tblHeaderDesc_t3ver_label">
+                               <source>Label</source>
+                       </trans-unit>
+                       <trans-unit id="diff">
+                               <source>Diff</source>
+                       </trans-unit>
+                       <trans-unit id="swapWithCurrent">
+                               <source>SWAP with current</source>
+                       </trans-unit>
+                       <trans-unit id="currentOnlineVersion">
+                               <source>CURRENT ONLINE VERSION!</source>
+                       </trans-unit>
+                       <trans-unit id="cmdPid0">
+                               <source>Page: Page + content</source>
+                       </trans-unit>
+                       <trans-unit id="cmdPid100">
+                               <source>Branch: All subpages</source>
+                       </trans-unit>
+                       <trans-unit id="cmdPid1">
+                               <source>Element: Just record</source>
+                       </trans-unit>
+                       <trans-unit id="createNewVersion">
+                               <source>Create new version</source>
+                       </trans-unit>
+                       <trans-unit id="previewLink">
+                               <source>Preview Link</source>
+                       </trans-unit>
+                       <trans-unit id="publishPage">
+                               <source>Publish Page</source>
+                       </trans-unit>
+                       <trans-unit id="swapPage">
+                               <source>Swap page</source>
+                       </trans-unit>
+                       <trans-unit id="publishPageQuestion">
+                               <source>Are you sure you want to publish all content %sfrom this page?</source>
+                       </trans-unit>
+                       <trans-unit id="swapPageQuestion">
+                               <source>Are you sure you want to publish (swap) all content %sfrom this page?</source>
+                       </trans-unit>
+                       <trans-unit id="publishPageQuestionStage">
+                               <source>in "Publish" stage </source>
+                       </trans-unit>
+                       <trans-unit id="previewUrl">
+                               <source>Preview Url:</source>
+                       </trans-unit>
+                       <trans-unit id="previewInstruction">
+                               <source>You can preview this page from the workspace using this link for the next %s hours (does not require backend login):</source>
+                       </trans-unit>
+                       <trans-unit id="versionDetails">
+                               <source>Details for version</source>
+                       </trans-unit>
+                       <trans-unit id="wsManagement">
+                               <source>Workspace management</source>
+                       </trans-unit>
+                       <trans-unit id="showDiffView">
+                               <source>Show difference view</source>
+                       </trans-unit>
+                       <trans-unit id="liveVersion">
+                               <source>Live Version:</source>
+                       </trans-unit>
+                       <trans-unit id="wsVersions">
+                               <source>Workspace Versions:</source>
+                       </trans-unit>
+                       <trans-unit id="controls">
+                               <source>Controls:</source>
+                       </trans-unit>
+                       <trans-unit id="goBack">
+                               <source>Click here to go back</source>
+                       </trans-unit>
+                       <trans-unit id="showAllInformation">
+                               <source>Show all information</source>
+                       </trans-unit>
+                       <trans-unit id="newElement">
+                               <source>New element</source>
+                       </trans-unit>
+                       <trans-unit id="deletedElement">
+                               <source>Deleted element</source>
+                       </trans-unit>
+                       <trans-unit id="moveToPlaceholder">
+                               <source>Move-to placeholder (destination)</source>
+                       </trans-unit>
+                       <trans-unit id="moveToPointer">
+                               <source>Move-to pointer (source)</source>
+                       </trans-unit>
+                       <trans-unit id="notAvailable">
+                               <source>N/A</source>
+                       </trans-unit>
+                       <trans-unit id="change">
+                               <source>change:</source>
+                       </trans-unit>
+                       <trans-unit id="element">
+                               <source> [Element]</source>
+                       </trans-unit>
+                       <trans-unit id="page">
+                               <source> [Page]</source>
+                       </trans-unit>
+                       <trans-unit id="branch">
+                               <source> [Branch]</source>
+                       </trans-unit>
+                       <trans-unit id="otherVersions">
+                               <source>Other version(s) in workspace </source>
+                       </trans-unit>
+                       <trans-unit id="multipleVersions">
+                               <source>Multiple versions in same workspace!</source>
+                       </trans-unit>
+                       <trans-unit id="versionInVersion">
+                               <source>Version inside version!</source>
+                       </trans-unit>
+                       <trans-unit id="lifecycle">
+                               <source>Lifecycle</source>
+                       </trans-unit>
+                       <trans-unit id="workspace">
+                               <source>Workspace</source>
+                       </trans-unit>
+                       <trans-unit id="diffToLiveElement">
+                               <source>Difference to live element:</source>
+                       </trans-unit>
+                       <trans-unit id="commentForReviewer">
+                               <source>Comment for Reviewer:</source>
+                       </trans-unit>
+                       <trans-unit id="commentForPublisher">
+                               <source>Comment for Publisher:</source>
+                       </trans-unit>
+                       <trans-unit id="sendItemsToReview">
+                               <source>Sending %s item(s) to review. </source>
+                       </trans-unit>
+                       <trans-unit id="sendAllToReview">
+                               <source>Send all to Review</source>
+                       </trans-unit>
+                       <trans-unit id="approveToPublish">
+                               <source>Approving %s item(s) to publishing. </source>
+                       </trans-unit>
+                       <trans-unit id="approveAllToPublish">
+                               <source>Approve all for Publishing</source>
+                       </trans-unit>
+                       <trans-unit id="offline">
+                               <source>[Offline]</source>
+                       </trans-unit>
+                       <trans-unit id="draft">
+                               <source>Draft</source>
+                       </trans-unit>
+                       <trans-unit id="archive">
+                               <source>Archive</source>
+                       </trans-unit>
+                       <trans-unit id="publishedXTimes">
+                               <source>Published %s times</source>
+                       </trans-unit>
+                       <trans-unit id="stage.sentToReview">
+                               <source>sent element to "Review"</source>
+                       </trans-unit>
+                       <trans-unit id="stage.approvedForPublish">
+                               <source>approved for "Publish"</source>
+                       </trans-unit>
+                       <trans-unit id="stage.rejectedElement">
+                               <source>rejected element!</source>
+                       </trans-unit>
+                       <trans-unit id="stage.resetToEdit">
+                               <source>reset to "Editing"</source>
+                       </trans-unit>
+                       <trans-unit id="stage.undefined">
+                               <source>[undefined]</source>
+                       </trans-unit>
+                       <trans-unit id="userComment">
+                               <source>User Comment</source>
+                       </trans-unit>
+                       <trans-unit id="subElementsClick">
+                               <source>[Sub elements, click for details]</source>
+                       </trans-unit>
+                       <trans-unit id="subElements">
+                               <source>[Sub elements]</source>
+                       </trans-unit>
+                       <trans-unit id="completeMatch">
+                               <source>Complete match on editable fields.</source>
+                       </trans-unit>
+                       <trans-unit id="editing">
+                               <source>Editing</source>
+                       </trans-unit>
+                       <trans-unit id="sendToReview">
+                               <source>Send to Review</source>
+                       </trans-unit>
+                       <trans-unit id="review">
+                               <source>Review</source>
+                       </trans-unit>
+                       <trans-unit id="swap">
+                               <source>Swap</source>
+                       </trans-unit>
+                       <trans-unit id="approveForPublishing">
+                               <source>Approve for Publishing</source>
+                       </trans-unit>
+                       <trans-unit id="publish">
+                               <source>Publish</source>
+                       </trans-unit>
+                       <trans-unit id="rejected">
+                               <source>Rejected</source>
+                       </trans-unit>
+                       <trans-unit id="comment">
+                               <source>Comment:</source>
+                       </trans-unit>
+                       <trans-unit id="resetStage">
+                               <source>Reset stage</source>
+                       </trans-unit>
+                       <trans-unit id="undefined">
+                               <source>Undefined</source>
+                       </trans-unit>
+                       <trans-unit id="rejectExplain">
+                               <source>Please explain why you reject:</source>
+                       </trans-unit>
+                       <trans-unit id="removeFromWorkspace">
+                               <source>Remove from workspace</source>
+                       </trans-unit>
+                       <trans-unit id="showLog">
+                               <source>Show Log</source>
+                       </trans-unit>
+                       <trans-unit id="liveWorkspace">
+                               <source>[Live workspace]</source>
+                       </trans-unit>
+                       <trans-unit id="draftWorkspaces">
+                               <source>Draft Workspaces</source>
+                       </trans-unit>
+                       <trans-unit id="defaultDraft">
+                               <source>[Default Draft]</source>
+                       </trans-unit>
+                       <trans-unit id="errors">
+                               <source>Errors:</source>
+                       </trans-unit>
+                       <trans-unit id="refresh">
+                               <source>Refresh</source>
+                       </trans-unit>
+                       <trans-unit id="allowPreviewOfWholeWorkspace">
+                               <source>Allow preview of whole workspace</source>
+                       </trans-unit>
+                       <trans-unit id="versionId">
+                               <source>ID:</source>
+                       </trans-unit>
+                       <trans-unit id="workspaceId">
+                               <source>Workspace-Id:</source>
+                       </trans-unit>
+                       <trans-unit id="live">
+                               <source>LIVE</source>
+                       </trans-unit>
+                       <trans-unit id="versionSelect.label">
+                               <source>Versions of this page:</source>
+                       </trans-unit>
+                       <trans-unit id="versionSelect.live">
+                               <source>LIVE version</source>
+                       </trans-unit>
+                       <trans-unit id="versionSelect.publish">
+                               <source>Publish page</source>
+                       </trans-unit>
+                       <trans-unit id="versionSelect.inBranch">
+                               <source>Inside branch, no further versioning possible</source>
+                       </trans-unit>
+                       <trans-unit id="versionSelect.versionsFound">
+                               <source>Versions found on page, no "Page" versioning possible</source>
+                       </trans-unit>
+                       <trans-unit id="autopublishTask.name">
+                               <source>Workspaces auto-publication</source>
+                       </trans-unit>
+                       <trans-unit id="autopublishTask.description">
+                               <source>This tasks checks any workspace that has a publication date set in the past and automatically publishes it.</source>
+                       </trans-unit>
+               </body>
+       </file>
+</xliff>
diff --git a/typo3/sysext/compatibility7/Resources/Private/Templates/Version.html b/typo3/sysext/compatibility7/Resources/Private/Templates/Version.html
new file mode 100644 (file)
index 0000000..a69c075
--- /dev/null
@@ -0,0 +1,34 @@
+<!-- ###FULLDOC### begin -->
+<div class="typo3-fullDoc">
+       <div id="typo3-docheader">
+               <div class="typo3-docheader-functions">
+                       <div class="left">###CSH### ###WS_MENU### ###FUNC_MENU###</div>
+                       <div class="right">###PAGEPATH######PAGEINFO###</div>
+               </div>
+               <div class="typo3-docheader-buttons">
+                       <div class="left">###BUTTONLIST_LEFT###</div>
+                       <div class="right">###BUTTONLIST_RIGHT###</div>
+               </div>
+       </div>
+
+       <div id="typo3-docbody">
+               <div id="typo3-inner-docbody">
+                       ###CONTENT###
+               </div>
+       </div>
+</div>
+<!-- ###FULLDOC### end -->
+
+<!-- Grouping the icons on top -->
+
+<!-- ###BUTTON_GROUP_WRAP### -->
+<div class="buttongroup">###BUTTONS###</div>
+<!-- ###BUTTON_GROUP_WRAP### -->
+
+<!-- ###BUTTON_GROUPS_LEFT### -->
+<!-- ###BUTTON_GROUP4### -->###VIEW###<!-- ###BUTTON_GROUP4### -->
+<!-- ###BUTTON_GROUPS_LEFT### -->
+
+<!-- ###BUTTON_GROUPS_RIGHT### -->
+<!-- ###BUTTON_GROUP1### -->###SHORTCUT###<!-- ###BUTTON_GROUP1### -->
+<!-- ###BUTTON_GROUPS_RIGHT### -->
\ No newline at end of file
diff --git a/typo3/sysext/compatibility7/Resources/Public/JavaScript/ContextMenuActions.js b/typo3/sysext/compatibility7/Resources/Public/JavaScript/ContextMenuActions.js
new file mode 100644 (file)
index 0000000..3f42aba
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * 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/Compatibility7/ContextMenuActions
+ *
+ * JavaScript to handle Version actions from context menu
+ * @exports TYPO3/CMS/Version/ContextMenuActions
+ */
+define(function () {
+    'use strict';
+
+    /**
+     * @exports TYPO3/CMS/Compatibility7/ContextMenuActions
+     */
+    var ContextMenuActions = {};
+
+    ContextMenuActions.openVersionModule = function (table, uid) {
+        var $anchorElement = $(this);
+        var actionUrl = $anchorElement.data('actionUrl');
+        top.TYPO3.Backend.ContentContainer.setUrl(
+            actionUrl +
+            '&redirect=' + top.rawurlencode(top.list_frame.document.location.pathname + top.list_frame.document.location.search)
+        );
+    };
+
+    return ContextMenuActions;
+});
index 1810138..5536a4d 100644 (file)
@@ -6,4 +6,9 @@ if (TYPO3_MODE === 'BE') {
         $GLOBALS['TBE_MODULES_EXT']['xMOD_db_new_content_el']['addElClasses']['tx_indexed_search_pi_wizicon'] =
             \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('compatibility7') . 'PHP/class.tx_indexed_search_pi_wizicon.php';
     }
+
+    if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('version') &&
+        !\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('workspaces')) {
+        $GLOBALS['TYPO3_CONF_VARS']['BE']['ContextMenu']['ItemProviders'][1486418676] = \TYPO3\CMS\Compatibility7\ContextMenu\ItemProvider::class;
+    }
 }
index d66a31a..abc30c9 100644 (file)
@@ -19,6 +19,10 @@ been marked as deprecated:
 * `getTabMenu`
 * `getVersionSelector`
 
+The following method from `TYPO3\CMS\Backend\Template\ModuleTemplate` have
+been marked as deprecated:
+
+* `getVersionSelector`
 
 Impact
 ======
@@ -37,4 +41,6 @@ Migration
 
 Some replacements are available in the `\TYPO3\CMS\Backend\Template\ModuleTemplate` class.
 
+Some other functionality is moved to separate classes when explicitly calling the version selector.
+
 .. index:: PHP-API, Backend
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Important-79942-VersionSelectorViewMovedToCompatibility7.rst b/typo3/sysext/core/Documentation/Changelog/master/Important-79942-VersionSelectorViewMovedToCompatibility7.rst
new file mode 100644 (file)
index 0000000..5786ecc
--- /dev/null
@@ -0,0 +1,18 @@
+.. include:: ../../Includes.txt
+
+=================================================================
+Important: #79942 - Version selector view moved to compatibility7
+=================================================================
+
+See :issue:`79942`
+
+Description
+===========
+
+The custom Backend module for showing and selecting versions of a specific page, which was
+part of EXT:version has been moved to EXT:compatibility7. The backend module is solely
+available via the ClickMenu as it is formally superseded by the Workspaces Backend module.
+
+All related PHP classes and template files have been moved as well.
+
+.. index:: PHP-API, Backend
diff --git a/typo3/sysext/version/Classes/ContextMenu/ItemProvider.php b/typo3/sysext/version/Classes/ContextMenu/ItemProvider.php
deleted file mode 100644 (file)
index 4082da4..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\CMS\Version\ContextMenu;
-
-/*
- * 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\ContextMenu\ItemProviders\AbstractProvider;
-use TYPO3\CMS\Backend\Utility\BackendUtility;
-
-/**
- * Context menu item provider for version module
- */
-class ItemProvider extends AbstractProvider
-{
-    /**
-     * @var array
-     */
-    protected $itemsConfiguration = [
-        'versioning' => [
-            'type' => 'item',
-            'label' => 'LLL:EXT:version/Resources/Private/Language/locallang.xlf:title',
-            'iconIdentifier' => 'actions-version-page-open',
-            'callbackAction' => 'openVersionModule'
-        ]
-    ];
-
-    /**
-     * @return bool
-     */
-    public function canHandle(): bool
-    {
-        return isset($GLOBALS['TCA'][$this->table]) && $GLOBALS['TCA'][$this->table]['ctrl']['versioningWS'];
-    }
-
-    /**
-     * This needs to be lower than priority of the RecordProvider
-     *
-     * @return int
-     */
-    public function getPriority(): int
-    {
-        return 55;
-    }
-
-    /**
-     * Registers custom JS module with item onclick behaviour
-     *
-     * @param string $itemName
-     * @return array
-     */
-    protected function getAdditionalAttributes(string $itemName): array
-    {
-        $url = BackendUtility::getModuleUrl('web_txversionM1', ['table' => $this->table, 'uid' => $this->identifier]);
-        return [
-            'data-action-url' => htmlspecialchars($url),
-            'data-callback-module' => 'TYPO3/CMS/Version/ContextMenuActions'];
-    }
-
-    /**
-     * Adds import/export items to the "submenu" if available
-     *
-     * @param array $items
-     * @return array
-     */
-    public function addItems(array $items): array
-    {
-        $this->initDisabledItems();
-
-        if (isset($items['delete'])) {
-            $localItems = $this->prepareItems($this->itemsConfiguration);
-            $position = array_search('delete', array_keys($items), true);
-
-            $beginning = array_slice($items, 0, $position+1, true);
-            $end = array_slice($items, $position, null, true);
-
-            $items = $beginning + $localItems + $end;
-        }
-        return $items;
-    }
-
-    /**
-     * @param string $itemName
-     * @param string $type
-     * @return bool
-     */
-    protected function canRender(string $itemName, string $type): bool
-    {
-        if (in_array($itemName, $this->disabledItems, true)) {
-            return false;
-        }
-        $canRender = false;
-        switch ($itemName) {
-            case 'versioning':
-                $canRender = (int)$this->identifier > 0  && $this->backendUser->check('modules', 'web_txversionM1');
-                break;
-        }
-        return $canRender;
-    }
-}
diff --git a/typo3/sysext/version/Classes/Controller/VersionModuleController.php b/typo3/sysext/version/Classes/Controller/VersionModuleController.php
deleted file mode 100644 (file)
index c0edb8f..0000000
+++ /dev/null
@@ -1,635 +0,0 @@
-<?php
-namespace TYPO3\CMS\Version\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 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\Database\ConnectionPool;
-use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
-use TYPO3\CMS\Core\Imaging\Icon;
-use TYPO3\CMS\Core\Utility\ArrayUtility;
-use TYPO3\CMS\Core\Utility\DiffUtility;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Lang\LanguageService;
-
-/**
- * Versioning module, including workspace management
- */
-class VersionModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
-{
-    /**
-     * Module configuration
-     *
-     * @var array
-     */
-    public $MCONF = [];
-
-    /**
-     * Module menu items
-     *
-     * @var array
-     */
-    public $MOD_MENU = [];
-
-    /**
-     * Module session settings
-     *
-     * @var array
-     */
-    public $MOD_SETTINGS = [];
-
-    /**
-     * document template object
-     *
-     * @var \TYPO3\CMS\Backend\Template\DocumentTemplate
-     */
-    public $doc;
-
-    /**
-     * @var string
-     */
-    public $content;
-
-    /**
-     * @var string
-     */
-    public $table;
-
-    /**
-     * @var string
-     */
-    public $details;
-
-    /**
-     * @var string
-     */
-    public $diffOnly;
-
-    /**
-     * @var int
-     */
-    public $uid;
-
-    /**
-     * @var array|bool
-     */
-    public $pageinfo;
-
-    /**
-     * @var bool
-     */
-    public $recordFound;
-
-    /**
-     * Accumulated content
-     *
-     * @var int
-     */
-    public $showWorkspaceCol = 0;
-
-    /**
-     * @var array
-     */
-    public $formatWorkspace_cache = [];
-
-    /**
-     * @var array
-     */
-    public $formatCount_cache = [];
-
-    /**
-     * @var array
-     */
-    public $targets = [];
-
-    /**
-     * Accumulation of online targets.
-     *
-     * @var string
-     */
-    public $pageModule = '';
-
-    /**
-     * Name of page module
-     *
-     * @var bool
-     */
-    public $publishAccess = false;
-
-    /**
-     * @var array
-     */
-    public $stageIndex = [];
-
-    /**
-     * @var array
-     */
-    public $recIndex = [];
-
-    /**
-     * @var string
-     */
-    public $REQUEST_URI = '';
-
-    /**
-     * The name of the module
-     *
-     * @var string
-     */
-    protected $moduleName = 'web_txversionM1';
-
-    /**
-     * ModuleTemplate object
-     *
-     * @var ModuleTemplate
-     */
-    protected $moduleTemplate;
-
-    /**
-     * Initialize language files
-     */
-    public function __construct()
-    {
-        $GLOBALS['SOBE'] = $this;
-        $this->getLanguageService()->includeLLFile('EXT:version/Resources/Private/Language/locallang.xlf');
-        $this->moduleTemplate = GeneralUtility::makeInstance(ModuleTemplate::class);
-    }
-
-    /**
-     * Initialize menu configuration
-     *
-     * @return void
-     */
-    public function menuConfig()
-    {
-        // CLEANSE SETTINGS
-        $this->MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, GeneralUtility::_GP('SET'), $this->moduleName, 'ses');
-    }
-
-    /**
-     * Main function of the module. Write the content to $this->content
-     *
-     * @return void
-     */
-    public function main()
-    {
-        // Template markers
-        $markers = [
-            'CSH' => '',
-            'FUNC_MENU' => '',
-            'WS_MENU' => '',
-            'CONTENT' => ''
-        ];
-        // Setting module configuration:
-        $this->MCONF['name'] = $this->moduleName;
-        $this->REQUEST_URI = str_replace('&sendToReview=1', '', GeneralUtility::getIndpEnv('REQUEST_URI'));
-        // Draw the header.
-        $this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
-        $this->doc->setModuleTemplate('EXT:version/Resources/Private/Templates/version.html');
-
-        // Setting up the context sensitive menu:
-        $this->getPageRenderer()->loadJquery();
-        $this->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Backend/ContextMenu');
-        // Getting input data:
-        $this->id = (int)GeneralUtility::_GP('id');
-
-        // Record uid. Goes with table name to indicate specific record
-        $this->uid = (int)GeneralUtility::_GP('uid');
-        // // Record table. Goes with uid to indicate specific record
-        $this->table = GeneralUtility::_GP('table');
-
-        $this->details = GeneralUtility::_GP('details');
-        // Page id. If set, indicates activation from Web>Versioning module
-        $this->diffOnly = GeneralUtility::_GP('diffOnly');
-        // Flag. If set, shows only the offline version and with diff-view
-        // Force this setting:
-        $this->MOD_SETTINGS['expandSubElements'] = true;
-        $this->MOD_SETTINGS['diff'] = $this->details || $this->MOD_SETTINGS['diff'] ? 1 : 0;
-        // Reading the record:
-        $record = BackendUtility::getRecord($this->table, $this->uid);
-        if ($record['pid'] == -1) {
-            $record = BackendUtility::getRecord($this->table, $record['t3ver_oid']);
-        }
-        $this->recordFound = is_array($record);
-        $pidValue = $this->table === 'pages' ? $this->uid : $record['pid'];
-        // Checking access etc.
-        if ($this->recordFound && $GLOBALS['TCA'][$this->table]['ctrl']['versioningWS'] && !$this->id) {
-            $this->uid = $record['uid'];
-            // Might have changed if new live record was found!
-            // Access check!
-            // The page will show only if there is a valid page and if this page may be viewed by the user
-            $this->pageinfo = BackendUtility::readPageAccess($pidValue, $this->perms_clause);
-            $access = is_array($this->pageinfo) ? 1 : 0;
-            if ($pidValue && $access || $GLOBALS['BE_USER']->user['admin'] && !$pidValue) {
-                // If another page module was specified, replace the default Page module with the new one
-                $newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule'));
-                $this->pageModule = BackendUtility::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
-                // Setting publish access permission for workspace:
-                $this->publishAccess = $GLOBALS['BE_USER']->workspacePublishAccess($GLOBALS['BE_USER']->workspace);
-                $this->versioningMgm();
-            }
-            // Setting up the buttons and markers for docheader
-            $docHeaderButtons = $this->getButtons();
-            $markers['CSH'] = $docHeaderButtons['csh'];
-            $markers['FUNC_MENU'] = BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
-            $markers['CONTENT'] = $this->content;
-        } else {
-            // If no access or id value, create empty document
-            $this->content = '<h2>' . htmlspecialchars($this->getLanguageService()->getLL('clickAPage_header')) . '</h2><div>' . $this->getLanguageService()->getLL('clickAPage_content') . '</div>';
-            // Setting up the buttons and markers for docheader
-            $docHeaderButtons = $this->getButtons();
-            $markers['CONTENT'] = $this->content;
-        }
-        // Build the <body> for the module
-        $this->content = $this->doc->startPage($this->getLanguageService()->getLL('title'));
-        $this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
-        $this->content .= $this->doc->endPage();
-        $this->content = $this->doc->insertStylesAndJS($this->content);
-    }
-
-    /**
-     * Create the panel of buttons for submitting the form or otherwise perform operations.
-     *
-     * @return array All available buttons as an assoc. array
-     */
-    protected function getButtons()
-    {
-        $buttons = [
-            'csh' => '',
-            'view' => '',
-            'record_list' => '',
-            'shortcut' => ''
-        ];
-        // CSH
-        if ($this->recordFound && $GLOBALS['TCA'][$this->table]['ctrl']['versioningWS']) {
-            // View page
-            $buttons['view'] = '
-                               <a href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($this->pageinfo['uid'], '', BackendUtility::BEgetRootLine($this->pageinfo['uid']))) . '" title="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.showPage')) . '">
-                                       ' . $this->moduleTemplate->getIconFactory()->getIcon('actions-document-view', Icon::SIZE_SMALL)->render() . '
-                               </a>';
-            // Shortcut
-            if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
-                $buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->moduleName);
-            }
-            // If access to Web>List for user, then link to that module.
-            $buttons['record_list'] = '<a href="' . htmlspecialchars(BackendUtility::getModuleUrl(
-                'web_list',
-                [
-                    'id' => $this->pageinfo['uid'],
-                    'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')
-                ]
-            )) . '">' . $this->moduleTemplate->getIconFactory()->getIcon('actions-system-list-open', Icon::SIZE_SMALL)->render() . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.showList')) . '</a>';
-        }
-        return $buttons;
-    }
-
-    /******************************
-     *
-     * Versioning management
-     *
-     ******************************/
-    /**
-     * Management of versions for record
-     *
-     * @return void
-     */
-    public function versioningMgm()
-    {
-        $lang = $this->getLanguageService();
-        // Diffing:
-        $diff_1 = GeneralUtility::_POST('diff_1');
-        $diff_2 = GeneralUtility::_POST('diff_2');
-        $content = '';
-        if (GeneralUtility::_POST('do_diff')) {
-            $content .= '<div class="panel panel-space panel-default">';
-            $content .= '<div class="panel-heading">' . $lang->getLL('diffing') . '</div>';
-            if ($diff_1 && $diff_2) {
-                $diff_1_record = BackendUtility::getRecord($this->table, $diff_1);
-                $diff_2_record = BackendUtility::getRecord($this->table, $diff_2);
-                if (is_array($diff_1_record) && is_array($diff_2_record)) {
-                    $diffUtility = GeneralUtility::makeInstance(DiffUtility::class);
-                    $diffUtility->stripTags = false;
-                    $rows = [];
-                    $rows[] = '
-                                                                       <tr>
-                                                                               <th>' . $lang->getLL('fieldname') . '</th>
-                                                                               <th width="98%">' . $lang->getLL('coloredDiffView') . ':</th>
-                                                                       </tr>
-                                                               ';
-                    foreach ($diff_1_record as $fN => $fV) {
-                        if ($GLOBALS['TCA'][$this->table]['columns'][$fN] && $GLOBALS['TCA'][$this->table]['columns'][$fN]['config']['type'] !== 'passthrough' && $fN !== 't3ver_label') {
-                            if ((string)$diff_1_record[$fN] !== (string)$diff_2_record[$fN]) {
-                                $diffres = $diffUtility->makeDiffDisplay(
-                                    BackendUtility::getProcessedValue($this->table, $fN, $diff_2_record[$fN], 0, 1),
-                                    BackendUtility::getProcessedValue($this->table, $fN, $diff_1_record[$fN], 0, 1)
-                                );
-                                $rows[] = '
-                                                                       <tr>
-                                                                               <td>' . $fN . '</td>
-                                                                               <td width="98%">' . $diffres . '</td>
-                                                                       </tr>
-                                                               ';
-                            }
-                        }
-                    }
-                    if (count($rows) > 1) {
-                        $content .= '<div class="table-fit"><table class="table">' . implode('', $rows) . '</table></div>';
-                    } else {
-                        $content .= '<div class="panel-body">' . $lang->getLL('recordsMatchesCompletely') . '</div>';
-                    }
-                } else {
-                    $content .= '<div class="panel-body">' . $lang->getLL('errorRecordsNotFound') . '</div>';
-                }
-            } else {
-                $content .= '<div class="panel-body">' . $lang->getLL('errorDiffSources') . '</div>';
-            }
-            $content .= '</div>';
-        }
-        // Element:
-        $record = BackendUtility::getRecord($this->table, $this->uid);
-        $recTitle = BackendUtility::getRecordTitle($this->table, $record, true);
-        // Display versions:
-        $content .= '
-                       <form name="theform" action="' . str_replace('&sendToReview=1', '', $this->REQUEST_URI) . '" method="post">
-                               <div class="panel panel-space panel-default">
-                               <div class="panel-heading">' . $recTitle . '</div>
-                                       <div class="table-fit">
-                                               <table class="table">
-                                                       <thead>
-                                                               <tr>
-                                                                       <th colspan="2" class="col-icon"></th>
-                                                                       <th title="' . $lang->getLL('tblHeaderDesc_title') . '">' . $lang->getLL('tblHeader_title') . '</th>
-                                                                       <th title="' . $lang->getLL('tblHeaderDesc_uid') . '"><i>' . $lang->getLL('tblHeader_uid') . '</i></th>
-                                                                       <th title="' . $lang->getLL('tblHeaderDesc_t3ver_oid') . '"><i>' . $lang->getLL('tblHeader_t3ver_oid') . '</i></th>
-                                                                       <th title="' . $lang->getLL('tblHeaderDesc_t3ver_id') . '"><i>' . $lang->getLL('tblHeader_t3ver_id') . '</i></th>
-                                                                       <th title="' . $lang->getLL('tblHeaderDesc_t3ver_wsid') . '"><i>' . $lang->getLL('tblHeader_t3ver_wsid') . '</i></th>
-                                                                       <th title="' . htmlspecialchars($lang->getLL('tblHeaderDesc_t3ver_state')) . '"><i>' . $lang->getLL('tblHeader_t3ver_state') . '</i></th>
-                                                                       <th title="' . $lang->getLL('tblHeaderDesc_t3ver_stage') . '"><i>' . $lang->getLL('tblHeader_t3ver_stage') . '</i></th>
-                                                                       <th title="' . $lang->getLL('tblHeaderDesc_t3ver_count') . '"><i>' . $lang->getLL('tblHeader_t3ver_count') . '</i></th>
-                                                                       <th title="' . $lang->getLL('tblHeaderDesc_pid') . '"><i>' . $lang->getLL('tblHeader_pid') . '</i></th>
-                                                                       <th title="' . $lang->getLL('tblHeaderDesc_t3ver_label') . '"><i>' . $lang->getLL('tblHeader_t3ver_label') . '</i></th>
-                                                                       <th></th>
-                                                                       <th colspan="2">
-                                                                               <button class="btn btn-default btn-sm" type="submit"  name="do_diff" value="true">
-                                                                                       ' . $lang->getLL('diff') . '
-                                                                               </button>
-                                                                       </th>
-                                                               </tr>
-                                                       </thead>
-                                                       <tbody>
-                       ';
-        $versions = BackendUtility::selectVersionsOfRecord($this->table, $this->uid, '*', $GLOBALS['BE_USER']->workspace);
-        foreach ($versions as $row) {
-            $adminLinks = $this->adminLinks($this->table, $row);
-
-            $editUrl = BackendUtility::getModuleUrl('record_edit', [
-                'edit' => [
-                    $this->table => [
-                        $row['uid'] => 'edit'
-                    ]
-                ],
-                'columnsOnly' => 't3ver_label',
-                'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')
-            ]);
-            $content .= '
-                               <tr' . ($row['uid'] != $this->uid ? '' : ' class="active"') . '>
-                                       <td class="col-icon">' .
-                        ($row['uid'] != $this->uid ?
-                            '<a href="' . BackendUtility::getLinkToDataHandlerAction('&cmd[' . $this->table . '][' . $this->uid . '][version][swapWith]=' . $row['uid'] . '&cmd[' . $this->table . '][' . $this->uid . '][version][action]=swap') . '" title="' . htmlspecialchars($lang->getLL('swapWithCurrent')) . '">' . $this->moduleTemplate->getIconFactory()->getIcon('actions-version-swap-version', Icon::SIZE_SMALL)->render() . '</a>' :
-                            '<span title="' . htmlspecialchars($lang->getLL('currentOnlineVersion')) . '">' . $this->moduleTemplate->getIconFactory()->getIcon('status-status-current', Icon::SIZE_SMALL)->render() . '</span>'
-                        ) . '
-                                       </td>
-                                       <td class="col-icon">' . $this->moduleTemplate->getIconFactory()->getIconForRecord($this->table, $row, Icon::SIZE_SMALL)->render() . '</td>
-                                       <td>' . BackendUtility::getRecordTitle($this->table, $row, true) . '</td>
-                                       <td>' . $row['uid'] . '</td>
-                                       <td>' . $row['t3ver_oid'] . '</td>
-                                       <td>' . $row['t3ver_id'] . '</td>
-                                       <td>' . $row['t3ver_wsid'] . '</td>
-                                       <td>' . $row['t3ver_state'] . '</td>
-                                       <td>' . $row['t3ver_stage'] . '</td>
-                                       <td>' . $row['t3ver_count'] . '</td>
-                                       <td>' . $row['pid'] . '</td>
-                                       <td>
-                                               <a href="' . htmlspecialchars($editUrl) . '" title="' . htmlspecialchars($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:cm.edit')) . '">
-                                                       ' . $this->moduleTemplate->getIconFactory()->getIcon('actions-open', Icon::SIZE_SMALL)->render() . '
-                                               </a>' . htmlspecialchars($row['t3ver_label']) . '
-                                       </td>
-                                       <td class="col-control">' . $adminLinks . '</td>
-                                       <td class="text-center success"><input type="radio" name="diff_1" value="' . $row['uid'] . '"' . ($diff_1 == $row['uid'] ? ' checked="checked"' : '') . '/></td>
-                                       <td class="text-center danger"><input type="radio" name="diff_2" value="' . $row['uid'] . '"' . ($diff_2 == $row['uid'] ? ' checked="checked"' : '') . '/></td>
-                               </tr>';
-            // Show sub-content if the table is pages AND it is not the online branch (because that will mostly render the WHOLE tree below - not smart;)
-            if ($this->table === 'pages' && $row['uid'] != $this->uid) {
-                $sub = $this->pageSubContent($row['uid']);
-                if ($sub) {
-                    $content .= '
-                                               <tr>
-                                                       <td colspan="2"></td>
-                                                       <td colspan="11">' . $sub . '</td>
-                                                       <td class="success"></td>
-                                                       <td class="danger"></td>
-                                               </tr>';
-                }
-            }
-        }
-        $content .= '
-                                                       </tbody>
-                                               </table>
-                                       </div>
-                               </div>
-                       </form>';
-        $this->content .= '<h2>' . htmlspecialchars($lang->getLL('title')) . '</h2><div>' . $content . '</div>';
-        // Create new:
-        $content = '
-                       <form action="' . htmlspecialchars(BackendUtility::getModuleUrl('tce_db')) . '" method="post">
-                               <div class="row">
-                                       <div class="col-sm-6 col-md-4 col-lg-3">
-                                               <div class="form-group">
-                                                       <label for="typo3-new-version-label">' . $lang->getLL('tblHeader_t3ver_label') . '</label>
-                                                       <input id="typo3-new-version-label" class="form-control" type="text" name="cmd[' . $this->table . '][' . $this->uid . '][version][label]" />
-                                               </div>
-                                               <div class="form-group">
-                                                       <input type="hidden" name="cmd[' . $this->table . '][' . $this->uid . '][version][action]" value="new" />
-                                                       <input type="hidden" name="prErr" value="1" />
-                                                       <input type="hidden" name="redirect" value="' . htmlspecialchars($this->REQUEST_URI) . '" />
-                                                       <input class="btn btn-default" type="submit" name="_" value="' . $lang->getLL('createNewVersion') . '" />
-                                               </div>
-                                       </div>
-                               </div>
-                       </form>
-
-               ';
-        $this->content .= '<h2>' . htmlspecialchars($lang->getLL('createNewVersion')) . '</h2><div>' . $content . '</div>';
-    }
-
-    /**
-     * Recursively look for children for page version with $pid
-     *
-     * @param int $pid UID of page record for which to look up sub-elements following that version
-     * @param int $c Counter, do not set (limits to 100 levels)
-     * @return string Table with content if any
-     */
-    public function pageSubContent($pid, $c = 0)
-    {
-        $tableNames = ArrayUtility::removeArrayEntryByValue(array_keys($GLOBALS['TCA']), 'pages');
-        $tableNames[] = 'pages';
-        $content = '';
-        foreach ($tableNames as $table) {
-            // Basically list ALL tables - not only those being copied might be found!
-            $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
-                ->getQueryBuilderForTable($table);
-            $queryBuilder->getRestrictions()
-                ->removeAll()
-                ->add(GeneralUtility::makeInstance(DeletedRestriction::class));
-
-            $queryBuilder
-                ->select('*')
-                ->from($table)
-                ->where(
-                    $queryBuilder->expr()->eq(
-                        'pid',
-                        $queryBuilder->createNamedParameter($pid, \PDO::PARAM_INT)
-                    )
-                );
-
-            if (!empty($GLOBALS['TCA'][$table]['ctrl']['sortby'])) {
-                $queryBuilder->orderBy($GLOBALS['TCA'][$table]['ctrl']['sortby']);
-            }
-
-            $result = $queryBuilder->execute();
-            if ($result->rowCount()) {
-                $content .= '
-                                       <table class="table">
-                                               <tr>
-                                                       <th class="col-icon">' . $this->moduleTemplate->getIconFactory()->getIconForRecord($table, [], Icon::SIZE_SMALL)->render() . '</th>
-                                                       <th class="col-title">' . htmlspecialchars($this->getLanguageService()->sL($GLOBALS['TCA'][$table]['ctrl']['title'])) . '</th>
-                                                       <th></th>
-                                                       <th></th>
-                                               </tr>';
-                while ($subrow = $result->fetch()) {
-                    $ownVer = $this->lookForOwnVersions($table, $subrow['uid']);
-                    $content .= '
-                                               <tr>
-                                                       <td class="col-icon">' . $this->moduleTemplate->getIconFactory()->getIconForRecord($table, $subrow, Icon::SIZE_SMALL)->render() . '</td>
-                                                       <td class="col-title">' . BackendUtility::getRecordTitle($table, $subrow, true) . '</td>
-                                                       <td>' . ($ownVer > 1 ? '<a href="' . htmlspecialchars(BackendUtility::getModuleUrl('web_txversionM1', ['table' => $table, 'uid' => $subrow['uid']])) . '">' . ($ownVer - 1) . '</a>' : '') . '</td>
-                                                       <td class="col-control">' . $this->adminLinks($table, $subrow) . '</td>
-                                               </tr>';
-                    if ($table === 'pages' && $c < 100) {
-                        $sub = $this->pageSubContent($subrow['uid'], $c + 1);
-                        if ($sub) {
-                            $content .= '
-                                                               <tr>
-                                                                       <td></td>
-                                                                       <td></td>
-                                                                       <td></td>
-                                                                       <td width="98%">' . $sub . '</td>
-                                                               </tr>';
-                        }
-                    }
-                }
-                $content .= '</table>';
-            }
-        }
-        return $content;
-    }
-
-    /**
-     * Look for number of versions of a record
-     *
-     * @param string $table Table name
-     * @param int $uid Record uid
-     * @return int Number of versions for record, FALSE if none.
-     */
-    public function lookForOwnVersions($table, $uid)
-    {
-        $versions = BackendUtility::selectVersionsOfRecord($table, $uid, 'uid', null);
-        if (is_array($versions)) {
-            return count($versions);
-        }
-        return false;
-    }
-
-    /**
-     * Administrative links for a table / record
-     *
-     * @param string $table Table name
-     * @param array $row Record for which administrative links are generated.
-     * @return string HTML link tags.
-     */
-    public function adminLinks($table, $row)
-    {
-        // Edit link:
-        $editUrl = BackendUtility::getModuleUrl('record_edit', [
-            'edit' => [
-                $table => [
-                    $row['uid'] => 'edit'
-                ]
-            ],
-            'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')
-        ]);
-        $adminLink = '<div class="btn-group btn-group-sm" role="group">';
-        $adminLink .= '<a class="btn btn-default" href="' . htmlspecialchars($editUrl) . '" title="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:cm.edit')) . '">' . $this->moduleTemplate->getIconFactory()->getIcon('actions-open', Icon::SIZE_SMALL)->render() . '</a>';
-        // Delete link:
-        $adminLink .= '<a class="btn btn-default" href="' . htmlspecialchars(BackendUtility::getLinkToDataHandlerAction('&cmd[' . $table . '][' . $row['uid'] . '][delete]=1')) . '" title="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:cm.delete')) . '">' . $this->moduleTemplate->getIconFactory()->getIcon('actions-edit-delete', Icon::SIZE_SMALL)->render() . '</a>';
-        $adminLink .= '</div>';
-        if ($table === 'pages') {
-            // If another page module was specified, replace the default Page module with the new one
-            $newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule'));
-            $pageModule = BackendUtility::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
-            $adminLink .= '<div class="btn-group btn-group-sm">';
-            $adminLink .= '<a class="btn btn-default" href="#" onclick="top.loadEditId(' . $row['uid'] . ');top.goToModule(' . GeneralUtility::quoteJSvalue($pageModule) . '); return false;">'
-                . $this->moduleTemplate->getIconFactory()->getIcon('actions-page-open', Icon::SIZE_SMALL)->render()
-                . '</a>';
-            $adminLink .= '<a class="btn btn-default" href="#" onclick="top.loadEditId(' . $row['uid'] . ');top.goToModule(\'web_list\'); return false;">' . $this->moduleTemplate->getIconFactory()->getIcon('actions-system-list-open', Icon::SIZE_SMALL)->render() . '</a>';
-            // "View page" icon is added:
-            $adminLink .= '<a class="btn btn-default" href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($row['uid'], '', BackendUtility::BEgetRootLine($row['uid']))) . '">' . $this->moduleTemplate->getIconFactory()->getIcon('actions-document-view', Icon::SIZE_SMALL)->render() . '</a>';
-            $adminLink .= '</div>';
-        } else {
-            if ($row['pid'] == -1) {
-                $getVars = '&ADMCMD_vPrev[' . rawurlencode(($table . ':' . $row['t3ver_oid'])) . ']=' . $row['uid'];
-                // "View page" icon is added:
-                $adminLink .= '<div class="btn-group btn-group-sm" role="group"><a class="btn btn-default" href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($row['_REAL_PID'], '', BackendUtility::BEgetRootLine($row['_REAL_PID']), '', '', $getVars)) . '">' . $this->moduleTemplate->getIconFactory()->getIcon('actions-document-view', Icon::SIZE_SMALL)->render() . '</a></div>';
-            }
-        }
-        return $adminLink;
-    }
-
-    /**
-     * Injects the request object for the current request and gathers all data.
-     *
-     * @param ServerRequestInterface $request the current request
-     * @param ResponseInterface $response the prepared response
-     * @return ResponseInterface the response with the content
-     */
-    public function mainAction(ServerRequestInterface $request, ResponseInterface $response)
-    {
-        $this->init();
-        $this->main();
-
-        $response->getBody()->write($this->content);
-        return $response;
-    }
-
-    /**
-     * @return LanguageService
-     */
-    protected function getLanguageService()
-    {
-        return $GLOBALS['LANG'];
-    }
-}
diff --git a/typo3/sysext/version/Classes/View/VersionView.php b/typo3/sysext/version/Classes/View/VersionView.php
deleted file mode 100644 (file)
index 3f3e7ac..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-<?php
-namespace TYPO3\CMS\Version\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\Imaging\Icon;
-use TYPO3\CMS\Core\Imaging\IconFactory;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Lang\LanguageService;
-
-/**
- * Contains some parts for staging, versioning and workspaces
- * to interact with the TYPO3 Core Engine
- */
-class VersionView
-{
-    /**
-     * Creates the version selector for the page id inputted.
-     * Moved out of the core file \TYPO3\CMS\Backend\Template\DocumentTemplate
-     *
-     * @param int $id Page id to create selector for.
-     * @param bool $noAction If set, there will be no button for swapping page.
-     * @return string
-     * @see \TYPO3\CMS\Backend\Template\DocumentTemplate
-     */
-    public function getVersionSelector($id, $noAction = false)
-    {
-        if ($id <= 0) {
-            return '';
-        }
-        if ($GLOBALS['BE_USER']->workspace == 0) {
-            $lang = $this->getLanguageService();
-            // Get Current page record:
-            $curPage = BackendUtility::getRecord('pages', $id);
-            // If the selected page is not online, find the right ID
-            $onlineId = $curPage['pid'] == -1 ? $curPage['t3ver_oid'] : $id;
-            // Select all versions of online version:
-            $versions = BackendUtility::selectVersionsOfRecord('pages', $onlineId, 'uid,pid,t3ver_label,t3ver_oid,t3ver_wsid,t3ver_id', null);
-            // If more than one was found...:
-            if (count($versions) > 1) {
-                // Create selector box entries:
-                $opt = [];
-                foreach ($versions as $vRow) {
-                    if ($vRow['uid'] == $onlineId) {
-                        // Live version
-                        $label = '[' . htmlspecialchars($lang->sL('LLL:EXT:version/Resources/Private/Language/locallang.xlf:versionSelect.live')) . ']';
-                    } else {
-                        $label = $vRow['t3ver_label'] . ' (' . htmlspecialchars($lang->sL('LLL:EXT:version/Resources/Private/Language/locallang.xlf:versionId')) . ' ' . $vRow['t3ver_id'] . ($vRow['t3ver_wsid'] != 0 ? ' ' . htmlspecialchars($lang->sL('LLL:EXT:version/Resources/Private/Language/locallang.xlf:workspaceId')) . ' ' . $vRow['t3ver_wsid'] : '') . ')';
-                    }
-                    $opt[] = '<option value="' . htmlspecialchars(GeneralUtility::linkThisScript(['id' => $vRow['uid']])) . '"' . ($id == $vRow['uid'] ? ' selected="selected"' : '') . '>' . htmlspecialchars($label) . '</option>';
-                }
-                /** @var $iconFactory \TYPO3\CMS\Core\Imaging\IconFactory */
-                $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
-                // Add management link:
-                $management = '
-                                       <a class="btn btn-default" href="' . htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('web_txversionM1', ['table' => 'pages', 'uid' => $onlineId])) . '">
-                                               ' . $iconFactory->getIcon('actions-version-page-open', Icon::SIZE_SMALL)->render() . '
-                                               ' . htmlspecialchars($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:ver.mgm')) . '
-                                       </a>';
-                // Create onchange handler:
-                $onChange = 'window.location.href=this.options[this.selectedIndex].value;';
-                // Controls:
-                if ($id == $onlineId) {
-                    $controls = '<strong class="text-success">' . htmlspecialchars($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:ver.online')) . '</strong>';
-                } elseif (!$noAction) {
-                    $href = BackendUtility::getLinkToDataHandlerAction(
-                        '&cmd[pages][' . $onlineId . '][version][swapWith]=' . $id . '&cmd[pages][' . $onlineId . '][version][action]=swap',
-                        GeneralUtility::linkThisScript(['id' => $onlineId])
-                    );
-                    $controls = '
-                                               <a href="' . htmlspecialchars($href) . '" class="btn btn-default" title="' . htmlspecialchars($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:ver.swapPage')) . '">
-                                                       ' . $iconFactory->getIcon('actions-version-swap-version', Icon::SIZE_SMALL)->render() . '
-                                                       ' . htmlspecialchars($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:ver.swap')) . '
-                                               </a>';
-                }
-                // Write out HTML code:
-                return '
-                                       <!--
-                                               Version selector:
-                                       -->
-                                       <div id="typo3-version-selector" class="form-inline form-inline-spaced">
-                                               <div class="form-group">
-                                                       <label for="version-selector">' . htmlspecialchars($lang->sL('LLL:EXT:version/Resources/Private/Language/locallang.xlf:versionSelect.label')) . '</label>
-                                                       <select id="version-selector" class="form-control" onchange="' . htmlspecialchars($onChange) . '">
-                                                               ' . implode('', $opt) . '
-                                                       </select>
-                                               </div>
-                                               <div class="form-group">
-                                                       ' . $controls . '
-                                               </div>
-                                               <div class="form-group">
-                                                       ' . $management . '
-                                               </div>
-                                       </div>
-                               ';
-            }
-        }
-    }
-
-    /**
-     * @return LanguageService
-     */
-    protected function getLanguageService()
-    {
-        return $GLOBALS['LANG'];
-    }
-}
diff --git a/typo3/sysext/version/Configuration/Backend/Routes.php b/typo3/sysext/version/Configuration/Backend/Routes.php
deleted file mode 100644 (file)
index 7027134..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php
-
-/**
- * Definitions for routes provided by EXT:version
- */
-return [
-    // Register version_click_module entry point
-    'web_txversionM1' => [
-        'path' => '/record/versions/',
-        'target' => \TYPO3\CMS\Version\Controller\VersionModuleController::class . '::mainAction'
-    ]
-];
diff --git a/typo3/sysext/version/Resources/Private/Language/locallang.xlf b/typo3/sysext/version/Resources/Private/Language/locallang.xlf
deleted file mode 100644 (file)
index a2eec1c..0000000
+++ /dev/null
@@ -1,374 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
-       <file t3:id="1415815009" source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:37Z" product-name="version">
-               <header/>
-               <body>
-                       <trans-unit id="title">
-                               <source>Versioning</source>
-                       </trans-unit>
-                       <trans-unit id="title_review">
-                               <source>Send to review/pub</source>
-                       </trans-unit>
-                       <trans-unit id="mlang_labels_tablabel">
-                               <source>Page and content versioning and workspace management for pages.</source>
-                       </trans-unit>
-                       <trans-unit id="mlang_labels_tabdescr">
-                               <source>The Web&gt;Versioning module provides access to versioning features for the page tree.</source>
-                       </trans-unit>
-                       <trans-unit id="mlang_tabs_tab">
-                               <source>Versioning</source>
-                       </trans-unit>
-                       <trans-unit id="clickAPage_header">
-                               <source>Web&gt;Versioning module</source>
-                       </trans-unit>
-                       <trans-unit id="clickAPage_content">
-                               <source>Please click a page in the pagetree frame to see the versioning module.</source>
-                       </trans-unit>
-                       <trans-unit id="filter_drafts">
-                               <source>Drafts</source>
-                       </trans-unit>
-                       <trans-unit id="filter_archive">
-                               <source>Archive</source>
-                       </trans-unit>
-                       <trans-unit id="filter_all">
-                               <source>All</source>
-                       </trans-unit>
-                       <trans-unit id="diffing">
-                               <source>DIFFING</source>
-                       </trans-unit>
-                       <trans-unit id="fieldname">
-                               <source>Fieldname</source>
-                       </trans-unit>
-                       <trans-unit id="coloredDiffView">
-                               <source>Colored diff-view</source>
-                       </trans-unit>
-                       <trans-unit id="recordsMatchesCompletely">
-                               <source>Records matches completely on all editable fields!</source>
-                       </trans-unit>
-                       <trans-unit id="errorRecordsNotFound">
-                               <source>ERROR: Records could strangely not be found!</source>
-                       </trans-unit>
-                       <trans-unit id="errorDiffSources">
-                               <source>ERROR: You didn't select two sources for diffing!</source>
-                       </trans-unit>
-                       <trans-unit id="tblHeader_title">
-                               <source>Title</source>
-                       </trans-unit>
-                       <trans-unit id="tblHeader_uid">
-                               <source>UID</source>
-                       </trans-unit>
-                       <trans-unit id="tblHeader_t3ver_oid">
-                               <source>oid</source>
-                       </trans-unit>
-                       <trans-unit id="tblHeader_t3ver_id">
-                               <source>id</source>
-                       </trans-unit>
-                       <trans-unit id="tblHeader_t3ver_wsid">
-                               <source>wsid</source>
-                       </trans-unit>
-                       <trans-unit id="tblHeader_t3ver_state">
-                               <source>state</source>
-                       </trans-unit>
-                       <trans-unit id="tblHeader_t3ver_stage">
-                               <source>stage</source>
-                       </trans-unit>
-                       <trans-unit id="tblHeader_t3ver_count">
-                               <source>count</source>
-                       </trans-unit>
-                       <trans-unit id="tblHeader_pid">
-                               <source>pid</source>
-                       </trans-unit>
-                       <trans-unit id="tblHeader_t3ver_label">
-                               <source>Label</source>
-                       </trans-unit>
-                       <trans-unit id="tblHeaderDesc_title">
-                               <source>Header of element</source>
-                       </trans-unit>
-                       <trans-unit id="tblHeaderDesc_uid">
-                               <source>Unique ID of element</source>
-                       </trans-unit>
-                       <trans-unit id="tblHeaderDesc_t3ver_oid">
-                               <source>t3ver_oid - Reference to live version UID</source>
-                       </trans-unit>
-                       <trans-unit id="tblHeaderDesc_t3ver_id">
-                               <source>t3ver_id - Version number, incremental integer</source>
-                       </trans-unit>
-                       <trans-unit id="tblHeaderDesc_t3ver_wsid">
-                               <source>t3ver_wsid - Workspace ID. There can be only one version of an element per ID (except ID zero).</source>
-                       </trans-unit>
-                       <trans-unit id="tblHeaderDesc_t3ver_state">
-                               <source>t3ver_state - Special states of a version: 1=Placeholder for "New". 2=Marked deleted.</source>
-                       </trans-unit>
-                       <trans-unit id="tblHeaderDesc_t3ver_stage">
-                               <source>t3ver_stage - Publishing stage: Editing (0), review (1), publish (10), rejected (-1).</source>
-                       </trans-unit>
-                       <trans-unit id="tblHeaderDesc_t3ver_count">
-                               <source>t3ver_count - Life cycle counter. Incremented each time element is unpublished.</source>
-                       </trans-unit>
-                       <trans-unit id="tblHeaderDesc_pid">
-                               <source>Page ID</source>
-                       </trans-unit>
-                       <trans-unit id="tblHeaderDesc_t3ver_label">
-                               <source>Label</source>
-                       </trans-unit>
-                       <trans-unit id="diff">
-                               <source>Diff</source>
-                       </trans-unit>
-                       <trans-unit id="swapWithCurrent">
-                               <source>SWAP with current</source>
-                       </trans-unit>
-                       <trans-unit id="currentOnlineVersion">
-                               <source>CURRENT ONLINE VERSION!</source>
-                       </trans-unit>
-                       <trans-unit id="cmdPid0">
-                               <source>Page: Page + content</source>
-                       </trans-unit>
-                       <trans-unit id="cmdPid100">
-                               <source>Branch: All subpages</source>
-                       </trans-unit>
-                       <trans-unit id="cmdPid1">
-                               <source>Element: Just record</source>
-                       </trans-unit>
-                       <trans-unit id="createNewVersion">
-                               <source>Create new version</source>
-                       </trans-unit>
-                       <trans-unit id="previewLink">
-                               <source>Preview Link</source>
-                       </trans-unit>
-                       <trans-unit id="publishPage">
-                               <source>Publish Page</source>
-                       </trans-unit>
-                       <trans-unit id="swapPage">
-                               <source>Swap page</source>
-                       </trans-unit>
-                       <trans-unit id="publishPageQuestion">
-                               <source>Are you sure you want to publish all content %sfrom this page?</source>
-                       </trans-unit>
-                       <trans-unit id="swapPageQuestion">
-                               <source>Are you sure you want to publish (swap) all content %sfrom this page?</source>
-                       </trans-unit>
-                       <trans-unit id="publishPageQuestionStage">
-                               <source>in "Publish" stage </source>
-                       </trans-unit>
-                       <trans-unit id="previewUrl">
-                               <source>Preview Url:</source>
-                       </trans-unit>
-                       <trans-unit id="previewInstruction">
-                               <source>You can preview this page from the workspace using this link for the next %s hours (does not require backend login):</source>
-                       </trans-unit>
-                       <trans-unit id="versionDetails">
-                               <source>Details for version</source>
-                       </trans-unit>
-                       <trans-unit id="wsManagement">
-                               <source>Workspace management</source>
-                       </trans-unit>
-                       <trans-unit id="showDiffView">
-                               <source>Show difference view</source>
-                       </trans-unit>
-                       <trans-unit id="liveVersion">
-                               <source>Live Version:</source>
-                       </trans-unit>
-                       <trans-unit id="wsVersions">
-                               <source>Workspace Versions:</source>
-                       </trans-unit>
-                       <trans-unit id="controls">
-                               <source>Controls:</source>
-                       </trans-unit>
-                       <trans-unit id="goBack">
-                               <source>Click here to go back</source>
-                       </trans-unit>
-                       <trans-unit id="showAllInformation">
-                               <source>Show all information</source>
-                       </trans-unit>
-                       <trans-unit id="newElement">
-                               <source>New element</source>
-                       </trans-unit>
-                       <trans-unit id="deletedElement">
-                               <source>Deleted element</source>
-                       </trans-unit>
-                       <trans-unit id="moveToPlaceholder">
-                               <source>Move-to placeholder (destination)</source>
-                       </trans-unit>
-                       <trans-unit id="moveToPointer">
-                               <source>Move-to pointer (source)</source>
-                       </trans-unit>
-                       <trans-unit id="notAvailable">
-                               <source>N/A</source>
-                       </trans-unit>
-                       <trans-unit id="change">
-                               <source>change:</source>
-                       </trans-unit>
-                       <trans-unit id="element">
-                               <source> [Element]</source>
-                       </trans-unit>
-                       <trans-unit id="page">
-                               <source> [Page]</source>
-                       </trans-unit>
-                       <trans-unit id="branch">
-                               <source> [Branch]</source>
-                       </trans-unit>
-                       <trans-unit id="otherVersions">
-                               <source>Other version(s) in workspace </source>
-                       </trans-unit>
-                       <trans-unit id="multipleVersions">
-                               <source>Multiple versions in same workspace!</source>
-                       </trans-unit>
-                       <trans-unit id="versionInVersion">
-                               <source>Version inside version!</source>
-                       </trans-unit>
-                       <trans-unit id="lifecycle">
-                               <source>Lifecycle</source>
-                       </trans-unit>
-                       <trans-unit id="workspace">
-                               <source>Workspace</source>
-                       </trans-unit>
-                       <trans-unit id="diffToLiveElement">
-                               <source>Difference to live element:</source>
-                       </trans-unit>
-                       <trans-unit id="commentForReviewer">
-                               <source>Comment for Reviewer:</source>
-                       </trans-unit>
-                       <trans-unit id="commentForPublisher">
-                               <source>Comment for Publisher:</source>
-                       </trans-unit>
-                       <trans-unit id="sendItemsToReview">
-                               <source>Sending %s item(s) to review. </source>
-                       </trans-unit>
-                       <trans-unit id="sendAllToReview">
-                               <source>Send all to Review</source>
-                       </trans-unit>
-                       <trans-unit id="approveToPublish">
-                               <source>Approving %s item(s) to publishing. </source>
-                       </trans-unit>
-                       <trans-unit id="approveAllToPublish">
-                               <source>Approve all for Publishing</source>
-                       </trans-unit>
-                       <trans-unit id="offline">
-                               <source>[Offline]</source>
-                       </trans-unit>
-                       <trans-unit id="draft">
-                               <source>Draft</source>
-                       </trans-unit>
-                       <trans-unit id="archive">
-                               <source>Archive</source>
-                       </trans-unit>
-                       <trans-unit id="publishedXTimes">
-                               <source>Published %s times</source>
-                       </trans-unit>
-                       <trans-unit id="stage.sentToReview">
-                               <source>sent element to "Review"</source>
-                       </trans-unit>
-                       <trans-unit id="stage.approvedForPublish">
-                               <source>approved for "Publish"</source>
-                       </trans-unit>
-                       <trans-unit id="stage.rejectedElement">
-                               <source>rejected element!</source>
-                       </trans-unit>
-                       <trans-unit id="stage.resetToEdit">
-                               <source>reset to "Editing"</source>
-                       </trans-unit>
-                       <trans-unit id="stage.undefined">
-                               <source>[undefined]</source>
-                       </trans-unit>
-                       <trans-unit id="userComment">
-                               <source>User Comment</source>
-                       </trans-unit>
-                       <trans-unit id="subElementsClick">
-                               <source>[Sub elements, click for details]</source>
-                       </trans-unit>
-                       <trans-unit id="subElements">
-                               <source>[Sub elements]</source>
-                       </trans-unit>
-                       <trans-unit id="completeMatch">
-                               <source>Complete match on editable fields.</source>
-                       </trans-unit>
-                       <trans-unit id="editing">
-                               <source>Editing</source>
-                       </trans-unit>
-                       <trans-unit id="sendToReview">
-                               <source>Send to Review</source>
-                       </trans-unit>
-                       <trans-unit id="review">
-                               <source>Review</source>
-                       </trans-unit>
-                       <trans-unit id="swap">
-                               <source>Swap</source>
-                       </trans-unit>
-                       <trans-unit id="approveForPublishing">
-                               <source>Approve for Publishing</source>
-                       </trans-unit>
-                       <trans-unit id="publish">
-                               <source>Publish</source>
-                       </trans-unit>
-                       <trans-unit id="rejected">
-                               <source>Rejected</source>
-                       </trans-unit>
-                       <trans-unit id="comment">
-                               <source>Comment:</source>
-                       </trans-unit>
-                       <trans-unit id="resetStage">
-                               <source>Reset stage</source>
-                       </trans-unit>
-                       <trans-unit id="undefined">
-                               <source>Undefined</source>
-                       </trans-unit>
-                       <trans-unit id="rejectExplain">
-                               <source>Please explain why you reject:</source>
-                       </trans-unit>
-                       <trans-unit id="removeFromWorkspace">
-                               <source>Remove from workspace</source>
-                       </trans-unit>
-                       <trans-unit id="showLog">
-                               <source>Show Log</source>
-                       </trans-unit>
-                       <trans-unit id="liveWorkspace">
-                               <source>[Live workspace]</source>
-                       </trans-unit>
-                       <trans-unit id="draftWorkspaces">
-                               <source>Draft Workspaces</source>
-                       </trans-unit>
-                       <trans-unit id="defaultDraft">
-                               <source>[Default Draft]</source>
-                       </trans-unit>
-                       <trans-unit id="errors">
-                               <source>Errors:</source>
-                       </trans-unit>
-                       <trans-unit id="refresh">
-                               <source>Refresh</source>
-                       </trans-unit>
-                       <trans-unit id="allowPreviewOfWholeWorkspace">
-                               <source>Allow preview of whole workspace</source>
-                       </trans-unit>
-                       <trans-unit id="versionId">
-                               <source>ID:</source>
-                       </trans-unit>
-                       <trans-unit id="workspaceId">
-                               <source>Workspace-Id:</source>
-                       </trans-unit>
-                       <trans-unit id="live">
-                               <source>LIVE</source>
-                       </trans-unit>
-                       <trans-unit id="versionSelect.label">
-                               <source>Versions of this page:</source>
-                       </trans-unit>
-                       <trans-unit id="versionSelect.live">
-                               <source>LIVE version</source>
-                       </trans-unit>
-                       <trans-unit id="versionSelect.publish">
-                               <source>Publish page</source>
-                       </trans-unit>
-                       <trans-unit id="versionSelect.inBranch">
-                               <source>Inside branch, no further versioning possible</source>
-                       </trans-unit>
-                       <trans-unit id="versionSelect.versionsFound">
-                               <source>Versions found on page, no "Page" versioning possible</source>
-                       </trans-unit>
-                       <trans-unit id="autopublishTask.name">
-                               <source>Workspaces auto-publication</source>
-                       </trans-unit>
-                       <trans-unit id="autopublishTask.description">
-                               <source>This tasks checks any workspace that has a publication date set in the past and automatically publishes it.</source>
-                       </trans-unit>
-               </body>
-       </file>
-</xliff>
diff --git a/typo3/sysext/version/Resources/Private/Templates/version.html b/typo3/sysext/version/Resources/Private/Templates/version.html
deleted file mode 100644 (file)
index a69c075..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<!-- ###FULLDOC### begin -->
-<div class="typo3-fullDoc">
-       <div id="typo3-docheader">
-               <div class="typo3-docheader-functions">
-                       <div class="left">###CSH### ###WS_MENU### ###FUNC_MENU###</div>
-                       <div class="right">###PAGEPATH######PAGEINFO###</div>
-               </div>
-               <div class="typo3-docheader-buttons">
-                       <div class="left">###BUTTONLIST_LEFT###</div>
-                       <div class="right">###BUTTONLIST_RIGHT###</div>
-               </div>
-       </div>
-
-       <div id="typo3-docbody">
-               <div id="typo3-inner-docbody">
-                       ###CONTENT###
-               </div>
-       </div>
-</div>
-<!-- ###FULLDOC### end -->
-
-<!-- Grouping the icons on top -->
-
-<!-- ###BUTTON_GROUP_WRAP### -->
-<div class="buttongroup">###BUTTONS###</div>
-<!-- ###BUTTON_GROUP_WRAP### -->
-
-<!-- ###BUTTON_GROUPS_LEFT### -->
-<!-- ###BUTTON_GROUP4### -->###VIEW###<!-- ###BUTTON_GROUP4### -->
-<!-- ###BUTTON_GROUPS_LEFT### -->
-
-<!-- ###BUTTON_GROUPS_RIGHT### -->
-<!-- ###BUTTON_GROUP1### -->###SHORTCUT###<!-- ###BUTTON_GROUP1### -->
-<!-- ###BUTTON_GROUPS_RIGHT### -->
\ No newline at end of file
diff --git a/typo3/sysext/version/Resources/Public/JavaScript/ContextMenuActions.js b/typo3/sysext/version/Resources/Public/JavaScript/ContextMenuActions.js
deleted file mode 100644 (file)
index 0b47993..0000000
+++ /dev/null
@@ -1,38 +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/Version/ContextMenuActions
- *
- * JavaScript to handle Version actions from context menu
- * @exports TYPO3/CMS/Version/ContextMenuActions
- */
-define(function () {
-    'use strict';
-
-    /**
-     * @exports TYPO3/CMS/Version/ContextMenuActions
-     */
-    var ContextMenuActions = {};
-
-    ContextMenuActions.openVersionModule = function (table, uid) {
-        var $anchorElement = $(this);
-        var actionUrl = $anchorElement.data('actionUrl');
-        top.TYPO3.Backend.ContentContainer.setUrl(
-            actionUrl +
-            '&redirect=' + top.rawurlencode(top.list_frame.document.location.pathname + top.list_frame.document.location.search)
-        );
-    };
-
-    return ContextMenuActions;
-});
diff --git a/typo3/sysext/version/ext_tables.php b/typo3/sysext/version/ext_tables.php
deleted file mode 100644 (file)
index d9e03a2..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-defined('TYPO3_MODE') or die();
-
-if (TYPO3_MODE === 'BE' && !\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('workspaces')) {
-    $GLOBALS['TYPO3_CONF_VARS']['BE']['ContextMenu']['ItemProviders'][1486418676] = \TYPO3\CMS\Version\ContextMenu\ItemProvider::class;
-}