Browse Source

Fix regression in sorting

Laurent Destailleur 9 years ago
parent
commit
484dc5937b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      htdocs/core/db/DoliDB.class.php

+ 2 - 2
htdocs/core/db/DoliDB.class.php

@@ -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';
 				}
 			}