Disabling some or all controls in group field - controllable via pageTS
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_install.php
index 44b4864..5ac005f 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 1999-2006 Kasper Skaarhoj (kasperYYYY@typo3.com)
+*  (c) 1999-2008 Kasper Skaarhoj (kasperYYYY@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -313,17 +313,16 @@ class t3lib_install {
                        } else {
                                if (substr($value,0,1)==')' && substr($value,-1)==';')  {
                                        $ttype = array();
-                                       if (preg_match('/(ENGINE|TYPE)=([a-zA-Z]*)/',$value,$ttype)) {
+                                       if (preg_match('/(ENGINE|TYPE)[ ]*=[ ]*([a-zA-Z]*)/',$value,$ttype)) {
                                                $total[$table]['extra']['ENGINE'] = $ttype[2];
-                                       } else {
-                                               $total[$table]['extra']['ENGINE'] = $GLOBALS['TYPO3_DB']->default_engine;       // Fallback to default engine
-                                       }
+                                       } // Otherwise, just do nothing: If table engine is not defined, just accept the system default.
+
                                                // Set the collation, if specified
-                                       if (preg_match('/(COLLATE)=([a-zA-z0-9_-]+)/', $value, $tcollation)) {
+                                       if (preg_match('/(COLLATE)[ ]*=[ ]*([a-zA-z0-9_-]+)/', $value, $tcollation)) {
                                                $total[$table]['extra']['COLLATE'] = $tcollation[2];
                                        } else {
                                                        // Otherwise, get the CHARACTER SET and try to find the default collation for it as returned by "SHOW CHARACTER SET" query (for details, see http://dev.mysql.com/doc/refman/5.1/en/charset-table.html)
-                                               if (preg_match('/(CHARSET|CHARACTER SET)=([a-zA-z0-9_-]+)/', $value, $tcharset)) {      // Note: Keywords "DEFAULT CHARSET" and "CHARSET" are the same, so "DEFAULT" can just be ignored
+                                               if (preg_match('/(CHARSET|CHARACTER SET)[ ]*=[ ]*([a-zA-z0-9_-]+)/', $value, $tcharset)) {      // Note: Keywords "DEFAULT CHARSET" and "CHARSET" are the same, so "DEFAULT" can just be ignored
                                                        $charset = $tcharset[2];
                                                } else {
                                                        $charset = $GLOBALS['TYPO3_DB']->default_charset;       // Fallback to default charset