|
@@ -206,6 +206,9 @@ class IdentifierQuoter
|
|
|
/**
|
|
/**
|
|
|
* Quotes identifiers in "order by" expression objects
|
|
* Quotes identifiers in "order by" expression objects
|
|
|
*
|
|
*
|
|
|
|
|
+ * Strings with spaces are treated as literal expressions
|
|
|
|
|
+ * and will not have identifiers quoted.
|
|
|
|
|
+ *
|
|
|
* @param \Cake\Database\Expression\OrderByExpression $expression The expression to quote.
|
|
* @param \Cake\Database\Expression\OrderByExpression $expression The expression to quote.
|
|
|
* @return void
|
|
* @return void
|
|
|
*/
|
|
*/
|
|
@@ -216,7 +219,7 @@ class IdentifierQuoter
|
|
|
$field = $this->_driver->quoteIdentifier($field);
|
|
$field = $this->_driver->quoteIdentifier($field);
|
|
|
return $part;
|
|
return $part;
|
|
|
}
|
|
}
|
|
|
- if (is_string($part)) {
|
|
|
|
|
|
|
+ if (is_string($part) && strpos($part, ' ') === false) {
|
|
|
return $this->_driver->quoteIdentifier($part);
|
|
return $this->_driver->quoteIdentifier($part);
|
|
|
}
|
|
}
|
|
|
return $part;
|
|
return $part;
|