* Lots of non-functional changes (to comply with old patch)
authorMichael Stucki <michael.stucki@typo3.org>
Tue, 26 Feb 2008 14:18:20 +0000 (14:18 +0000)
committerMichael Stucki <michael.stucki@typo3.org>
Tue, 26 Feb 2008 14:18:20 +0000 (14:18 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3302 709f56b5-9817-0410-a4d7-c38de5d9e867

t3lib/class.t3lib_install.php

index 6f35351..c0c69d5 100755 (executable)
@@ -296,7 +296,7 @@ class t3lib_install {
                $table = '';
                $total = array();
 
-               foreach($lines as $value)       {
+               foreach ($lines as $value) {
                        if (substr($value,0,1)=='#') {
                                continue;       // Ignore comments
                        }
@@ -447,20 +447,23 @@ class t3lib_install {
                        $keyInformation = $GLOBALS['TYPO3_DB']->admin_get_keys($tableName);
 
                        foreach ($keyInformation as $kN => $keyRow) {
-                               $tempKeys[$tableName][$keyRow['Key_name']][$keyRow['Seq_in_index']] = $keyRow['Column_name'];
+                               $keyName = $keyRow['Key_name'];
+                               $colName = $keyRow['Column_name'];
+                               $tempKeys[$tableName][$keyName][$keyRow['Seq_in_index']] = $colName;
                                if ($keyRow['Sub_part']) {
-                                       $tempKeys[$tableName][$keyRow['Key_name']][$keyRow['Seq_in_index']].= '('.$keyRow['Sub_part'].')';
+                                       $tempKeys[$tableName][$keyName][$keyRow['Seq_in_index']].= '('.$keyRow['Sub_part'].')';
                                }
-                               if ($keyRow['Key_name']=='PRIMARY')     {
-                                       $tempKeysPrefix[$tableName][$keyRow['Key_name']] = 'PRIMARY KEY';
+                               if ($keyName=='PRIMARY')        {
+                                       $prefix = 'PRIMARY KEY';
                                } else {
                                        if ($keyRow['Non_unique'])      {
-                                               $tempKeysPrefix[$tableName][$keyRow['Key_name']] = 'KEY';
+                                               $prefix = 'KEY';
                                        } else {
-                                               $tempKeysPrefix[$tableName][$keyRow['Key_name']] = 'UNIQUE';
+                                               $prefix = 'UNIQUE';
                                        }
-                                       $tempKeysPrefix[$tableName][$keyRow['Key_name']].= ' '.$keyRow['Key_name'];
+                                       $prefix.= ' '.$keyName;
                                }
+                               $tempKeysPrefix[$tableName][$keyName] = $prefix;
                        }
                }
 
@@ -503,7 +506,7 @@ class t3lib_install {
                                                        if (is_array($info[$theKey])) {
                                                                foreach ($info[$theKey] as $fieldN => $fieldC) {
                                                                        $fieldN = str_replace('`','',$fieldN);
-                                                                       if (!isset($FDcomp[$table][$theKey][$fieldN]))  {
+                                                                       if (!isset($FDcomp[$table][$theKey][$fieldN])) {
                                                                                $extraArr[$table][$theKey][$fieldN] = $fieldC;
                                                                        } elseif (strcmp($FDcomp[$table][$theKey][$fieldN], $ignoreNotNullWhenComparing?str_replace(' NOT NULL', '', trim($fieldC)):trim($fieldC)))     {
                                                                                $diffArr[$table][$theKey][$fieldN] = $fieldC;