Follow-up of changeset 32847: DBAL cannot be loaded if typo3conf/ is not writable
authorXavier Perseguers <typo3@perseguers.ch>
Fri, 21 May 2010 06:08:29 +0000 (06:08 +0000)
committerXavier Perseguers <typo3@perseguers.ch>
Fri, 21 May 2010 06:08:29 +0000 (06:08 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/dbal/trunk@33343 735d13b6-9817-0410-8766-e36946ffe9aa

typo3/sysext/dbal/ChangeLog
typo3/sysext/dbal/class.tx_dbal_autoloader.php

index 24f347c..3282647 100644 (file)
@@ -1,3 +1,7 @@
+2010-05-21  Xavier Perseguers  <typo3@perseguers.ch>
+
+       * Follow-up of changeset 32847: DBAL cannot be loaded if typo3conf/ is not writable
+
 2010-05-03  Xavier Perseguers  <typo3@perseguers.ch>
 
        * Fixed 1-2-3 installer crash when having only mysql available
index e15305c..4af9e2c 100644 (file)
@@ -125,7 +125,14 @@ class tx_dbal_autoloader {
                                // Get lines from localconf file
                        $lines = $instObj->writeToLocalconf_control();
                        $instObj->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\'EXT\'][\'extList\']', $newExtList);
-                       $instObj->writeToLocalconf_control($lines);
+                       $result = $instObj->writeToLocalconf_control($lines);
+                       if ($result === 'nochange') {
+                               $message = 'DBAL was not loaded.';
+                               if (!@is_writable(PATH_typo3conf)) {
+                                       $message .= ' ' . PATH_typo3conf . ' is not writable!';
+                               }
+                               throw new Exception($message);
+                       }
 
                        $GLOBALS['TYPO3_CONF_VARS']['EXT']['extList'] = $newExtList;
                                // Make sure to get cache file for backend, not frontend