[TASK] Remove unused workspace_preview DB field 71/55871/7
authorBenni Mack <benni@typo3.org>
Fri, 23 Feb 2018 10:24:25 +0000 (11:24 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 28 Feb 2018 11:25:19 +0000 (12:25 +0100)
The unused BE_USER method setWorkspacePreview()
updates a DB field called "workspace_preview_id" which just
does not exist at all. It would lead to an SQL error if called.

However, since this method is never called, nor evaluated since TYPO3 6.2,
all functionality should be removed. Previewing a workspace is handled
via `be_users.workspace_id` anyway.

Resolves: #84021
Releases: master
Change-Id: I706e893aef1faaccf6e43f0e66ac28bff79190d8
Reviewed-on: https://review.typo3.org/55871
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php
typo3/sysext/core/ext_tables.sql
typo3/sysext/recycler/Tests/Functional/Fixtures/Database/be_users.xml

index 4fd0632..efd619a 100644 (file)
@@ -2225,21 +2225,6 @@ class BackendUserAuthentication extends AbstractUserAuthentication
         $this->workspaceRec = $this->checkWorkspace($this->workspace, '*');
     }
 
-    /**
-     * Setting workspace preview state for user:
-     *
-     * @param bool $previewState State of user preview.
-     */
-    public function setWorkspacePreview($previewState)
-    {
-        $this->user['workspace_preview'] = $previewState;
-        GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('be_users')->update(
-            'be_users',
-            ['workspace_preview_id' => $this->user['workspace_preview']],
-            ['uid' => (int)$this->user['uid']]
-        );
-    }
-
     /**
      * Return default workspace ID for user,
      * if EXT:workspaces is not installed the user will be pushed to the
index 8addb99..78fe090 100644 (file)
@@ -82,7 +82,6 @@ CREATE TABLE be_users (
        createdByAction int(11) DEFAULT '0' NOT NULL,
        usergroup_cached_list text,
        workspace_id int(11) DEFAULT '0' NOT NULL,
-       workspace_preview tinyint(3) DEFAULT '1' NOT NULL,
        category_perms text,
        PRIMARY KEY (uid),
        KEY parent (pid),
index c386c25..a719345 100644 (file)
@@ -20,7 +20,6 @@
                <lastlogin>1371033743</lastlogin>
                <createdByAction>0</createdByAction>
                <workspace_id>0</workspace_id>
-               <workspace_preview>1</workspace_preview>
        </be_users>
        <be_users>
                <uid>2</uid>
@@ -42,7 +41,6 @@
                <lastlogin>1452944915</lastlogin>
                <createdByAction>0</createdByAction>
                <workspace_id>0</workspace_id>
-               <workspace_preview>1</workspace_preview>
                <db_mountpoints>1</db_mountpoints>
                <usergroup>1</usergroup>
        </be_users>