Added feature #15075: [Install] make a pre-check for required php-extensions (Thanks...
authorXavier Perseguers <typo3@perseguers.ch>
Tue, 28 Sep 2010 11:05:00 +0000 (11:05 +0000)
committerXavier Perseguers <typo3@perseguers.ch>
Tue, 28 Sep 2010 11:05:00 +0000 (11:05 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/dbal/trunk@38709 735d13b6-9817-0410-8766-e36946ffe9aa

typo3/sysext/dbal/ChangeLog
typo3/sysext/dbal/class.tx_dbal_installtool.php
typo3/sysext/dbal/ext_localconf.php

index 9b5aeb9..8d0296e 100644 (file)
@@ -1,3 +1,7 @@
+2010-09-28  Xavier Perseguers  <typo3@perseguers.ch>
+
+       * Added feature #15075: [Install] make a pre-check for required php-extensions (Thanks to Jigal van Hemert)
+
 2010-09-21  Xavier Perseguers  <typo3@perseguers.ch>
 
        * Set version to 1.2.0alpha2
index 41148d1..3607746 100644 (file)
@@ -72,6 +72,27 @@ class tx_dbal_installtool {
        }
 
        /**
+        * Hooks into Installer to set required PHP modules.
+        *
+        * @param array $modules
+        * @param tx_install $instObj
+        * @return array modules
+        */
+       public function setRequiredPhpModules(array &$modules, tx_install $instObj) {
+               foreach ($modules as $key => $module) {
+                       if ($module === 'mysql') {
+                               $dbModules = array();
+                               foreach ($this->supportedDrivers as $abstractionLayer => $drivers) {
+                                       $dbModules = array_merge($dbModules, array_keys($drivers));
+                               }
+                               $module = $dbModules;
+                       }
+                       $modifiedModules[] = $module;
+               }
+               return $modifiedModules;
+       }
+
+       /**
         * Hooks into Installer to let a non-MySQL database to be configured.
         *
         * @param array $markers
index 352e12c..de99cea 100644 (file)
@@ -10,4 +10,5 @@ $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/class.db_list_extra.inc'] = t3lib_
 // Register a hook for the installer
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install/mod/class.tx_install.php']['stepOutput'][] = 'EXT:dbal/class.tx_dbal_installtool.php:tx_dbal_installtool';
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install/mod/class.tx_install.php']['writeLocalconf'][] = 'EXT:dbal/class.tx_dbal_installtool.php:tx_dbal_installtool';
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install/mod/class.tx_install.php']['requiredPhpModules'][] = 'EXT:dbal/class.tx_dbal_installtool.php:tx_dbal_installtool';
 ?>
\ No newline at end of file