[BUGFIX] Always use uc_default after first install 34/38834/2
authorJigal van Hemert <jigal.van.hemert@typo3.org>
Mon, 20 Apr 2015 18:54:54 +0000 (20:54 +0200)
committerMarkus Klein <klein.t3@reelworx.at>
Tue, 21 Apr 2015 12:21:43 +0000 (14:21 +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.

Resolves: #66432
Releases: master
Change-Id: Icb779860c54fd53af6c38437ab2dedad846a9fbc
Reviewed-on: http://review.typo3.org/38834
Reviewed-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
Tested-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php
typo3/sysext/install/Classes/Controller/Action/Step/DefaultConfiguration.php

index e5fcc1b..42b433d 100644 (file)
@@ -2359,11 +2359,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 912983a..2810f55 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',