Fixed bug #2186: Error installing static_info_tables
authorXavier Perseguers <typo3@perseguers.ch>
Sat, 1 May 2010 21:05:40 +0000 (21:05 +0000)
committerXavier Perseguers <typo3@perseguers.ch>
Sat, 1 May 2010 21:05:40 +0000 (21:05 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7499 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_sqlparser.php

index a9dd5cb..60d8a29 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-05-01  Xavier Perseguers  <typo3@perseguers.ch>
+
+       * Fixed bug #2186: Error installing static_info_tables
+
 2010-05-01  Benjamin Mack  <benni@typo3.org>
 
        * Followup to #14064: Removed unused functions to detect GDlib/TTF() in the installer
index 7a96cc4..57b456c 100644 (file)
@@ -556,7 +556,7 @@ class t3lib_sqlparser {
                $result['TABLE'] = $this->nextPart($parseString, '^([[:alnum:]_]+)[[:space:]]+');
 
                if ($result['TABLE'])   {
-                       if ($result['action'] = $this->nextPart($parseString, '^(CHANGE|DROP[[:space:]]+KEY|DROP[[:space:]]+PRIMARY[[:space:]]+KEY|ADD[[:space:]]+KEY|ADD[[:space:]]+PRIMARY[[:space:]]+KEY|DROP|ADD|RENAME)([[:space:]]+|\()'))        {
+                       if ($result['action'] = $this->nextPart($parseString, '^(CHANGE|DROP[[:space:]]+KEY|DROP[[:space:]]+PRIMARY[[:space:]]+KEY|ADD[[:space:]]+KEY|ADD[[:space:]]+PRIMARY[[:space:]]+KEY|ADD[[:space:]]+UNIQUE|DROP|ADD|RENAME)([[:space:]]+|\()'))  {
                                $actionKey = strtoupper(str_replace(array(' ',TAB,CR,LF),'',$result['action']));
 
                                        // Getting field:
@@ -582,6 +582,7 @@ class t3lib_sqlparser {
 
                                                case 'ADDKEY':
                                                case 'ADDPRIMARYKEY':
+                                               case 'ADDUNIQUE':
                                                        $result['KEY'] = $fieldKey;
                                                        $result['fields'] = $this->getValue($parseString, '_LIST', 'INDEX');
                                                        if ($this->parse_error) { return $this->parse_error; }
@@ -1724,6 +1725,7 @@ class t3lib_sqlparser {
                        break;
                        case 'ADDKEY':
                        case 'ADDPRIMARYKEY':
+                       case 'ADDUNIQUE':
                                $query.=' ('.implode(',',$components['fields']).')';
                        break;
                }