[!!!][TASK] Remove obsolete message about old-style workspaces 40/49540/3
authorBenni Mack <benni@typo3.org>
Mon, 22 Aug 2016 17:15:48 +0000 (19:15 +0200)
committerTymoteusz Motylewski <t.motylewski@gmail.com>
Mon, 22 Aug 2016 18:39:21 +0000 (20:39 +0200)
This was used in 4.5 back then when migrating to draft workspace
etc. The upgrade wizard in the install tool does not even exist
anymore, so the functionality is completely removed.

Resolves: #77591
Releases: master
Change-Id: Ibfe3f4cec232597c395ae2279f8bb4133c9eb7af
Reviewed-on: https://review.typo3.org/49540
Tested-by: Bamboo TYPO3com <info@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Tested-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
typo3/sysext/core/Documentation/Changelog/master/Breaking-77591-RemovedWorkspaceService-isOldStyleWorkspaceUsed.rst [new file with mode: 0644]
typo3/sysext/workspaces/Classes/Controller/ReviewController.php
typo3/sysext/workspaces/Classes/Service/WorkspaceService.php
typo3/sysext/workspaces/Resources/Private/Language/locallang.xlf

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-77591-RemovedWorkspaceService-isOldStyleWorkspaceUsed.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-77591-RemovedWorkspaceService-isOldStyleWorkspaceUsed.rst
new file mode 100644 (file)
index 0000000..e52a569
--- /dev/null
@@ -0,0 +1,27 @@
+====================================================================
+Breaking: #77591 - Removed WorkspaceService->isOldStyleWorkspaceUsed
+====================================================================
+
+Description
+===========
+
+The PHP method ``WorkspaceService->isOldStyleWorkspaceUsed()`` was removed without substitution. It existed to identify if
+Workspaces still was configured for TYPO3 4.4.
+
+
+Impact
+======
+
+Calling the PHP method directly will result in a fatal PHP error.
+
+
+Affected Installations
+======================
+
+TYPO3 installations using workspaces and extending the workspaces functionality extensively by providing a fallback layer to functionality for TYPO3 4.4 or lower.
+
+
+Migration
+=========
+
+Remove any occurrences to the PHP method.
\ No newline at end of file
index f93c2b3..5de6583 100644 (file)
@@ -18,8 +18,6 @@ use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Core\FormProtection\FormProtectionFactory;
 use TYPO3\CMS\Core\Imaging\Icon;
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Messaging\FlashMessageService;
 use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Extbase\Mvc\View\ViewInterface;
@@ -206,15 +204,6 @@ class ReviewController extends AbstractController
         parent::initializeAction();
         $backendRelPath = ExtensionManagementUtility::extRelPath('backend');
         $this->pageRenderer->addJsFile($backendRelPath . 'Resources/Public/JavaScript/ExtDirect.StateProvider.js');
-        if (WorkspaceService::isOldStyleWorkspaceUsed()) {
-            /** @var FlashMessage $flashMessage */
-            $flashMessage = GeneralUtility::makeInstance(FlashMessage::class, $this->getLanguageService()->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xlf:warning.oldStyleWorkspaceInUser'), '', FlashMessage::WARNING);
-            /** @var $flashMessageService FlashMessageService */
-            $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
-            /** @var $defaultFlashMessageQueue \TYPO3\CMS\Core\Messaging\FlashMessageQueue */
-            $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
-            $defaultFlashMessageQueue->enqueue($flashMessage);
-        }
         $this->pageRenderer->loadExtJS(false, false);
         $states = $this->getBackendUser()->uc['moduleData']['Workspaces']['States'];
         $this->pageRenderer->addInlineSetting('Workspaces', 'States', $states);
index 0c55db7..5e77394 100644 (file)
@@ -584,45 +584,6 @@ class WorkspaceService implements SingletonInterface
         return $GLOBALS['BE_USER']->checkLanguageAccess($languageUid);
     }
 
-    /**
-     * Trivial check to see if the user already migrated his workspaces
-     * to the new style (either manually or with the migrator scripts)
-     *
-     * @return bool
-     */
-    public static function isOldStyleWorkspaceUsed()
-    {
-        $cacheKey = 'workspace-oldstyleworkspace-notused';
-        $cacheResult = $GLOBALS['BE_USER']->getSessionData($cacheKey);
-        if (!$cacheResult) {
-            $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
-                ->getQueryBuilderForTable('sys_workspace');
-            $queryBuilder->getRestrictions()
-                ->removeAll()
-                ->add(GeneralUtility::makeInstance(DeletedRestriction::class));
-            $count = (int)$queryBuilder->count('uid')
-                ->from('sys_workspace')
-                ->where(
-                    $queryBuilder->expr()->neq('adminusers', $queryBuilder->quote('')),
-                    $queryBuilder->expr()->notLike(
-                        'adminusers',
-                        $queryBuilder->createNamedParameter('%' . $queryBuilder->escapeLikeWildcards('be_users') . '%')
-                    ),
-                    $queryBuilder->expr()->notLike(
-                        'adminusers',
-                        $queryBuilder->createNamedParameter('%' . $queryBuilder->escapeLikeWildcards('be_groups') . '%')
-                    )
-                )
-                ->execute()
-                ->fetchColumn(0);
-            $oldStyleWorkspaceIsUsed = $count > 0;
-            $GLOBALS['BE_USER']->setAndSaveSessionData($cacheKey, !$oldStyleWorkspaceIsUsed);
-        } else {
-            $oldStyleWorkspaceIsUsed = !$cacheResult;
-        }
-        return $oldStyleWorkspaceIsUsed;
-    }
-
     /**
      * Determine whether a specific page is new and not yet available in the LIVE workspace
      *
index c888fe6..56123c5 100644 (file)
                        <trans-unit id="error.getStageTitle.stageNotFound">
                                <source>Stage not found</source>
                        </trans-unit>
-                       <trans-unit id="warning.oldStyleWorkspaceInUser" xml:space="preserve">
-                               <source>It seems that you're still using old-style workspace. Please use the update scripts in the TYPO3
-                                       Install Tool to run the necessary updates. If you continue using this module without migrating your
-                                       workspace you might loose data.
-                               </source>
-                       </trans-unit>
                        <trans-unit id="info.newpage">
                                <source>New Page!</source>
                        </trans-unit>