Fixed bug #16444: Bugfix:dbal installs itself automatically whenever the install...
authorErnesto Baschny <ernst@cron-it.de>
Wed, 17 Nov 2010 17:51:42 +0000 (17:51 +0000)
committerErnesto Baschny <ernst@cron-it.de>
Wed, 17 Nov 2010 17:51:42 +0000 (17:51 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9463 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/dbal/class.tx_dbal_autoloader.php
typo3/sysext/install/mod/class.tx_install.php

index 686a224..f584fb8 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -35,6 +35,7 @@
        * Added feature #16439: Use the form protection API to implement the CSRF protection in user setup and install tool (Thanks to the Security Team: Oliver Klee, Helmut Hummel)
        * Added feature #11103: Improve advanced_htaccess and make it more compatible (Thanks to Christopher Stelmaszyk)
        * Added feature #11916: New TYPO3_DB method for queries that expect just a single result row: exec_SELECTgetSingleRow (Thanks to Jo Hasenau)
+       * Fixed bug #16444: Bugfix:dbal installs itself automatically whenever the install tool is called (Thanks to Susanne Moog)
 
 2010-11-17  Benjamin Mack  <benni@typo3.org>
 
index 1b723aa..256500a 100644 (file)
@@ -45,28 +45,30 @@ class tx_dbal_autoloader {
         * @return void
         */
        public function execute(tx_install $instObj) {
-               switch ($instObj->step) {
-                       case 0:
-                               if (!t3lib_extMgm::isLoaded('dbal') && $this->isDbalSupported()) {
-                                       $this->activateDbal();
+               if ($instObj->mode == '123') {
+                       switch ($instObj->step) {
+                               case 0:
+                                       if (!t3lib_extMgm::isLoaded('dbal') && $this->isDbalSupported()) {
+                                               $this->activateDbal();
 
-                                               // Reload page to have Install Tool actually load DBAL
-                                       $redirectUrl = t3lib_div::getIndpEnv('TYPO3_REQUEST_URL');
-                                       t3lib_utility_Http::redirect($redirectUrl);
-                               }
-                               break;
-                       case 1:
-                       case 2:
-                               if (!t3lib_extMgm::isLoaded('dbal') && $this->isDbalSupported()) {
-                                       $this->activateDbal();
-                               }
-                               break;
-                       case 3:
-                               $driver = $instObj->INSTALL['localconf.php']['typo_db_driver'];
-                               if ($driver === 'mysql') {
-                                       $this->deactivateDbal();
-                               }
-                               break;
+                                                       // Reload page to have Install Tool actually load DBAL
+                                               $redirectUrl = t3lib_div::getIndpEnv('TYPO3_REQUEST_URL');
+                                               t3lib_utility_Http::redirect($redirectUrl);
+                                       }
+                                       break;
+                               case 1:
+                               case 2:
+                                       if (!t3lib_extMgm::isLoaded('dbal') && $this->isDbalSupported()) {
+                                               $this->activateDbal();
+                                       }
+                                       break;
+                               case 3:
+                                       $driver = $instObj->INSTALL['localconf.php']['typo_db_driver'];
+                                       if ($driver === 'mysql') {
+                                               $this->deactivateDbal();
+                                       }
+                                       break;
+                       }
                }
        }
 
index 45866d7..6484414 100755 (executable)
@@ -278,12 +278,6 @@ class tx_install extends t3lib_install {
                        header('Pragma: no-cache');
                }
 
-                       // Let DBAL decide whether to load itself
-               $dbalLoaderFile = $this->backPath . 'sysext/dbal/class.tx_dbal_autoloader.php';
-               if (@is_file($dbalLoaderFile)) {
-                       include($dbalLoaderFile);
-               }
-
                        // ****************************
                        // Initializing incoming vars.
                        // ****************************
@@ -324,6 +318,12 @@ class tx_install extends t3lib_install {
                        $this->INSTALL['type'] = 'database';
                }
 
+                       // Let DBAL decide whether to load itself
+               $dbalLoaderFile = $this->backPath . 'sysext/dbal/class.tx_dbal_autoloader.php';
+               if (@is_file($dbalLoaderFile)) {
+                       include($dbalLoaderFile);
+               }
+
                        // Hook to raise the counter for the total steps in the 1-2-3 installer
                if (is_array ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install/mod/class.tx_install.php']['additionalSteps'])) {
                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install/mod/class.tx_install.php']['additionalSteps'] as $classData) {