[TASK] Respect alternative web mounts in suggest wizard
[Packages/TYPO3.CMS.git] / typo3 / sysext / recordlist / Classes / Browser / DatabaseBrowser.php
index 0da0bde..ca411e2 100644 (file)
@@ -172,20 +172,8 @@ class DatabaseBrowser extends AbstractElementBrowser implements ElementBrowserIn
         if (isset($tmpMount)) {
             $backendUser->setAndSaveSessionData('pageTree_temporaryMountPoint', (int)$tmpMount);
         }
-        // Set temporary DB mounts
-        $alternativeWebmountPoint = (int)$backendUser->getSessionData('pageTree_temporaryMountPoint');
-        if ($alternativeWebmountPoint) {
-            $alternativeWebmountPoint = GeneralUtility::intExplode(',', $alternativeWebmountPoint);
-            $backendUser->setWebmounts($alternativeWebmountPoint);
-        } else {
-            // Setting alternative browsing mounts (ONLY local to browse_links.php this script so they stay "read-only")
-            $alternativeWebmountPoints = \trim($backendUser->getTSConfig()['options.']['pageTree.']['altElementBrowserMountPoints'] ?? '');
-            $appendAlternativeWebmountPoints = $backendUser->getTSConfig()['options.']['pageTree.']['altElementBrowserMountPoints.']['append'] ?? '';
-            if ($alternativeWebmountPoints) {
-                $alternativeWebmountPoints = GeneralUtility::intExplode(',', $alternativeWebmountPoints);
-                $this->getBackendUser()->setWebmounts($alternativeWebmountPoints, $appendAlternativeWebmountPoints);
-            }
-        }
+
+        $backendUser->initializeWebmountsForElementBrowser();
     }
 
     /**