[TASK] Cleanup draft workspace usages
authorTolleiv Nietsch <info@tolleiv.de>
Wed, 6 Jul 2011 22:24:19 +0000 (00:24 +0200)
committerTolleiv Nietsch <info@tolleiv.de>
Wed, 6 Jul 2011 22:24:19 +0000 (00:24 +0200)
The draft workspace is deprecated since 4.4, this patch
makes sure nobody is able to continue using it and
cleans up the related codes.

Change-Id: I1579a193fb5d8c697851924a1a18fc80a274884e
Resolves: #27952
Releases: 4.6

typo3/sysext/workspaces/Classes/Service/Workspaces.php

index e2fc593..14ea0d8 100644 (file)
@@ -34,7 +34,6 @@ class tx_Workspaces_Service_Workspaces {
        const TABLE_WORKSPACE = 'sys_workspace';
        const SELECT_ALL_WORKSPACES = -98;
        const LIVE_WORKSPACE_ID = 0;
-       const DRAFT_WORKSPACE_ID = -1;
 
        /**
         * retrieves the available workspaces from the database and checks whether
@@ -49,9 +48,6 @@ class tx_Workspaces_Service_Workspaces {
                if ($GLOBALS['BE_USER']->checkWorkspace(array('uid' => (string) self::LIVE_WORKSPACE_ID))) {
                        $availableWorkspaces[self::LIVE_WORKSPACE_ID] = self::getWorkspaceTitle(self::LIVE_WORKSPACE_ID);
                }
-               if ($GLOBALS['BE_USER']->checkWorkspace(array('uid' => (string) self::DRAFT_WORKSPACE_ID))) {
-                       $availableWorkspaces[self::DRAFT_WORKSPACE_ID] = self::getWorkspaceTitle(self::DRAFT_WORKSPACE_ID);
-               }
 
                        // add custom workspaces (selecting all, filtering by BE_USER check):
                $customWorkspaces = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid, title, adminusers, members', 'sys_workspace', 'pid = 0' . t3lib_BEfunc::deleteClause('sys_workspace'), '', 'title');
@@ -79,9 +75,6 @@ class tx_Workspaces_Service_Workspaces {
                        case self::LIVE_WORKSPACE_ID:
                                $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_misc.xml:shortcut_onlineWS');
                                break;
-                       case self::DRAFT_WORKSPACE_ID:
-                               $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_misc.xml:shortcut_offlineWS');
-                               break;
                        default:
                                $labelField = $GLOBALS['TCA']['sys_workspace']['ctrl']['label'];
                                $wsRecord = t3lib_beFunc::getRecord('sys_workspace', $wsId, 'uid,' . $labelField);