FIXED: Critical issue where index columns would be split apart and rejoined assuming they were not quoted. Already quoted columns would end up quad (dobule x double) quoted.

This commit is contained in:
Damian Mooyman 2012-08-24 12:28:28 +12:00
parent 530c97f671
commit 7d7654caa0

View File

@ -858,7 +858,7 @@ class MSSQLDatabase extends SS_Database {
} }
if($indexSpec['type'] == 'unique') { if($indexSpec['type'] == 'unique') {
if(!is_array($indexSpec['value'])) $columns = preg_split('/ *, */', trim($indexSpec['value'])); if(!is_array($indexSpec['value'])) $columns = preg_split('/"? *, *"?/', trim(trim($indexSpec['value']), '"'));
else $columns = $indexSpec['value']; else $columns = $indexSpec['value'];
$SQL_columnList = '"' . implode('", "', $columns) . '"'; $SQL_columnList = '"' . implode('", "', $columns) . '"';