Permalink
Browse files

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...
1 parent 878f336 commit 887f8335eef0400c119cd874b718f7ca9f9d9d27 gwoo committed Aug 1, 2009
Showing with 3 additions and 2 deletions.
  1. +3 −2 cake/libs/model/datasources/dbo_source.php
@@ -2388,11 +2388,12 @@ function buildIndex($indexes, $table = null) {
if (!empty($value['unique'])) {
$out .= 'UNIQUE ';
}
+ $name = $this->startQuote . $name . $this->endQuote;
}
if (is_array($value['column'])) {
- $out .= 'KEY '. $name .' (' . join(', ', array_map(array(&$this, 'name'), $value['column'])) . ')';
+ $out .= 'KEY ' . $name . ' (' . join(', ', array_map(array(&$this, 'name'), $value['column'])) . ')';
} else {
- $out .= 'KEY '. $name .' (' . $this->name($value['column']) . ')';
+ $out .= 'KEY ' . $name . ' (' . $this->name($value['column']) . ')';
}
$join[] = $out;
}

0 comments on commit 887f833

Please sign in to comment.