MDL-69110 core: Unset the correct sort data element

This commit is contained in:
Jun Pataleta
2020-07-04 00:47:14 +08:00
parent c11e2517a7
commit b583c46297
+1 -1
View File
@@ -1307,7 +1307,7 @@ class flexible_table {
if (array_key_exists($sortby, $sortdata)) {
// This key already exists somewhere. Change its sortorder and bring it to the top.
//$sortorder = $sortdata[$sortby] = $sortorder;
unset($sortdata['sortby'][$sortby]);
unset($sortdata[$sortby]);
}
$sortdata = array_merge([$sortby => $sortorder], $sortdata);
}