Fix regression in sorting

This commit is contained in:
Laurent Destailleur 2015-12-18 18:05:07 +01:00
parent 43044bbb4f
commit 484dc5937b

View File

@ -237,9 +237,9 @@ abstract class DoliDB implements Database
$return.=preg_replace('/[^0-9a-z_\.]/i','',$val);
// Only ASC and DESC values are valid SQL
if ($sortorder === 'ASC') {
if (strtoupper($sortorder) === 'ASC') {
$return .= ' ASC';
} elseif ($sortorder === 'DESC') {
} elseif (strtoupper($sortorder) === 'DESC') {
$return .= ' DESC';
}
}