[BUGFIX] Improve detection of installed setup 18/41518/2
authorBenjamin Mack <benni@typo3.org>
Thu, 16 Jul 2015 21:34:53 +0000 (23:34 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 18 Jul 2015 12:19:23 +0000 (14:19 +0200)
When installing TYPO3 via composer and installing
an extension at the same time, the install tool cannot
be called after that, as the typo3conf/ directory already
exists.

The check is optimized to check for the LocalConfiguration.php
and PackageStates.php which are not present at first install.

Resolves: #68261
Releases: master
Change-Id: Ib2a787bf0968b1bcbcc3ed02e0b678ff8a74aa91
Reviewed-on: http://review.typo3.org/41518
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Jan Helke <typo3@helke.de>
Reviewed-by: Susanne Moog <typo3@susannemoog.de>
Tested-by: Susanne Moog <typo3@susannemoog.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/install/Classes/Controller/AbstractController.php
typo3/sysext/install/Classes/Service/EnableFileService.php

index ab0bacf..4322ddc 100644 (file)
@@ -61,7 +61,7 @@ class AbstractController {
         */
        protected function outputInstallToolNotEnabledMessageIfNeeded() {
                if (!$this->isInstallToolAvailable()) {
-                       if (!EnableFileService::isFirstInstallAllowed() && !is_dir(PATH_typo3conf)) {
+                       if (!EnableFileService::isFirstInstallAllowed()) {
                                /** @var \TYPO3\CMS\Install\Controller\Action\ActionInterface $action */
                                $action = $this->objectManager->get(\TYPO3\CMS\Install\Controller\Action\Common\FirstInstallAction::class);
                                $action->setAction('firstInstall');
index cd5f625..64682ef 100644 (file)
@@ -46,7 +46,7 @@ class EnableFileService {
         */
        static public function isFirstInstallAllowed() {
                $files = self::getFirstInstallFilePaths();
-               if (!is_dir(PATH_typo3conf) && !empty($files)) {
+               if (!empty($files) && !\TYPO3\CMS\Core\Core\Bootstrap::getInstance()->checkIfEssentialConfigurationExists()) {
                        return TRUE;
                }
                return FALSE;