[BUGFIX] Always use uc_default after first install 48/42848/2
authorJigal van Hemert <jigal.van.hemert@typo3.org>
Mon, 20 Apr 2015 18:54:54 +0000 (20:54 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Tue, 25 Aug 2015 17:29:36 +0000 (19:29 +0200)
If the Install Tool sets the start module on first login to allow the
installation of a distribution the uc_default settings must still be
applied. A special temporary setting by the Install Tool makes it easy
to detect this situation.

Change-Id: I33afcbd80595584767fe70dd972e24b9c43aa763
Resolves: #69138
Releases: 6.2
Reviewed-on: http://review.typo3.org/42848
Reviewed-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Tested-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Stephan GroƟberndt <stephan@grossberndt.de>
Reviewed-by: Philipp Gampe <philipp.gampe@typo3.org>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php
typo3/sysext/install/Classes/Controller/Action/Step/DefaultConfiguration.php

index 2a0881a..523e5c3 100644 (file)
@@ -2429,11 +2429,17 @@ This is a dump of the failures:
                }
                // Setting defaults if uc is empty
                $updated = FALSE;
+               $originalUc = array();
+               if (is_array($this->uc) && isset($this->uc['ucSetByInstallTool'])) {
+                       $originalUc = $this->uc;
+                       unset($originalUc['ucSetByInstallTool'], $this->uc);
+               }
                if (!is_array($this->uc)) {
                        $this->uc = array_merge(
                                $this->uc_default,
                                (array)$GLOBALS['TYPO3_CONF_VARS']['BE']['defaultUC'],
-                               GeneralUtility::removeDotsFromTS((array)$this->getTSConfigProp('setup.default'))
+                               GeneralUtility::removeDotsFromTS((array)$this->getTSConfigProp('setup.default')),
+                               $originalUc
                        );
                        $this->overrideUC();
                        $updated = TRUE;
index ff08bcb..758de7b 100644 (file)
@@ -36,7 +36,10 @@ class DefaultConfiguration extends AbstractStepAction {
                if (isset($this->postValues['values']['loaddistributions'])) {
 
                        // update the admin backend user to show the distribution management on login
-                       $adminUserFirstLogin = array('startModuleOnFirstLogin' => 'tools_ExtensionmanagerExtensionmanager->tx_extensionmanager_tools_extensionmanagerextensionmanager%5Baction%5D=distributions&tx_extensionmanager_tools_extensionmanagerextensionmanager%5Bcontroller%5D=List');
+                       $adminUserFirstLogin = array(
+                               'startModuleOnFirstLogin' => 'tools_ExtensionmanagerExtensionmanager->tx_extensionmanager_tools_extensionmanagerextensionmanager%5Baction%5D=distributions&tx_extensionmanager_tools_extensionmanagerextensionmanager%5Bcontroller%5D=List',
+                               'ucSetByInstallTool' => '1',
+                       );
                        $this->getDatabaseConnection()->exec_UPDATEquery(
                                        'be_users',
                                        'admin=1',