fix compliancy with more elaborate ORDER syntax, such as "DESC NULLS FIRST" in postgresql, in DboSource::order()

This commit is contained in:
Dieter Plaetinck 2010-02-24 10:48:36 +01:00 committed by José Lorenzo Rodríguez
parent bed4027d37
commit a79ff508a6

View file

@ -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, '.')) {