diff --git a/ChangeLog b/ChangeLog index a17ef8f3fb..9e9454fd99 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ phpMyAdmin - ChangeLog 4.2.1.0 (not yet released) - bug #4380 Cannot display table structure with enums containing special characters +- bug #4381 Cannot remove the last remembered sorted column 4.2.0.0 (not yet released) + rfe #1403 Export only triggers diff --git a/js/columndelete.js b/js/columndelete.js index 8282e9bb31..4dead77444 100644 --- a/js/columndelete.js +++ b/js/columndelete.js @@ -47,6 +47,9 @@ function redirect(target, parent) var head = URL['head']; head = head.slice(0,head.indexOf('ORDER+BY')); URL['head'] = head; + // removing the last sort order should have priority over what + // is remembered via the RememberSorting directive + URL['tail'] += '&discard_remembered_sort=1'; } var middle_part = columns.join('%2C+'); url = URL['head'] + middle_part + URL['tail']; diff --git a/libraries/Table.class.php b/libraries/Table.class.php index 001a760e7b..fe4369e220 100644 --- a/libraries/Table.class.php +++ b/libraries/Table.class.php @@ -1606,6 +1606,9 @@ class PMA_Table // do checking based on property if ($property == self::PROP_SORTED_COLUMN) { if (isset($this->uiprefs[$property])) { + if (isset($_REQUEST['discard_remembered_sort'])) { + $this->removeUiProp(self::PROP_SORTED_COLUMN); + } // check if the column name exists in this table $tmp = explode(' ', $this->uiprefs[$property]); $colname = $tmp[0];