MINOR: extended flexibility of the helper ordermorespecifically

This commit is contained in:
Andreas Piening 2010-02-04 05:13:11 +00:00
parent 5e8234ba2d
commit b2968dc888

View File

@ -386,7 +386,6 @@ class SQLite3Database extends SS_Database {
$oldCols = array();
foreach($oldFieldList as $name => $spec) {
aDebug($name == $fieldName ? $fieldSpec : $spec);
$newColsSpec[] = "\"$name\" " . ($name == $fieldName ? $fieldSpec : $spec);
}
@ -1050,7 +1049,7 @@ class SQLite3Database extends SS_Database {
// find a match in the SELECT array and replace
foreach($select as $s) {
if(preg_match('/"[a-z0-9_]+"\.' . $term . '/i', trim($s))) {
if(preg_match('/"[a-z0-9_]+"\.[\'"]?' . $term . '[\'"]?/i', trim($s))) {
$terms[$i] = $s . ' ' . $direction;
$altered = true;
break;