MDL-75170 tablelib: Use sql_order_by_null to sort columns

This commit is contained in:
Alex Morris 2022-09-30 11:29:27 +13:00
parent 70dfee9e23
commit fee755bbfa
No known key found for this signature in database
GPG Key ID: 0501031386C92557

View File

@ -601,9 +601,9 @@ class flexible_table {
$column = $DB->sql_order_by_text($column);
}
if ($order == SORT_ASC) {
$bits[] = $column . ' ASC';
$bits[] = $DB->sql_order_by_null($column);
} else {
$bits[] = $column . ' DESC';
$bits[] = $DB->sql_order_by_null($column, SORT_DESC);
}
}