Skip to content
This repository
Browse code

fixes #6539 quoting in buildIndex

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8267 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information...
commit 887f8335eef0400c119cd874b718f7ca9f9d9d27 1 parent 878f336
authored August 01, 2009
5  cake/libs/model/datasources/dbo_source.php
@@ -2388,11 +2388,12 @@ function buildIndex($indexes, $table = null) {
2388 2388
 				if (!empty($value['unique'])) {
2389 2389
 					$out .= 'UNIQUE ';
2390 2390
 				}
  2391
+				$name = $this->startQuote . $name . $this->endQuote;
2391 2392
 			}
2392 2393
 			if (is_array($value['column'])) {
2393  
-				$out .= 'KEY '. $name .' (' . join(', ', array_map(array(&$this, 'name'), $value['column'])) . ')';
  2394
+				$out .= 'KEY ' . $name . ' (' . join(', ', array_map(array(&$this, 'name'), $value['column'])) . ')';
2394 2395
 			} else {
2395  
-				$out .= 'KEY '. $name .' (' . $this->name($value['column']) . ')';
  2396
+				$out .= 'KEY ' . $name . ' (' . $this->name($value['column']) . ')';
2396 2397
 			}
2397 2398
 			$join[] = $out;
2398 2399
 		}

0 notes on commit 887f833

Please sign in to comment.
Something went wrong with that request. Please try again.