fixes #6539 quoting in buildIndex

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8267 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2009-08-01 18:25:25 +00:00
parent 878f3367d4
commit 887f8335ee

View file

@ -2388,11 +2388,12 @@ class DboSource extends DataSource {
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;
}