mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
fix compliancy with more elaborate ORDER syntax, such as "DESC NULLS FIRST" in postgresql, in DboSource::order()
This commit is contained in:
parent
bed4027d37
commit
a79ff508a6
1 changed files with 2 additions and 2 deletions
|
@ -2333,9 +2333,9 @@ class DboSource extends DataSource {
|
|||
continue;
|
||||
}
|
||||
|
||||
if (preg_match('/\\x20ASC|\\x20DESC/i', $key, $_dir)) {
|
||||
if (preg_match('/\\x20(ASC|DESC).*/i', $key, $_dir)) {
|
||||
$dir = $_dir[0];
|
||||
$key = preg_replace('/\\x20ASC|\\x20DESC/i', '', $key);
|
||||
$key = preg_replace('/\\x20(ASC|DESC).*/i', '', $key);
|
||||
}
|
||||
|
||||
if (strpos($key, '.')) {
|
||||
|
|
Loading…
Reference in a new issue