Merge pull request #1602 from vishal-singh-webkul/gli-2872

Fixed:  Order by and Order way not working for the lists in the Back office.
This commit is contained in:
Rohit Jain
2026-01-24 13:15:10 +05:30
committed by GitHub

View File

@@ -875,9 +875,13 @@ class AdminControllerCore extends Controller
$prefix = $this->getCookieFilterPrefix();
$filters = array();
if (isset($this->list_id)) {
$postPrefixPattern = '#^('.
$this->list_id.'Filter_|'.
'submitFilter'.
')#i';
foreach ($_POST as $key => $value) {
// only process the filter fields.
if (stripos($key, $this->list_id.'Filter_') !== 0) {
if (!preg_match($postPrefixPattern, $key)) {
continue;
}
@@ -898,9 +902,15 @@ class AdminControllerCore extends Controller
}
}
$getPrefixPattern = '#^(' .
'submitFilter|'.
$this->list_id.'Filter_|'.
$this->list_id.'Orderby|'.
$this->list_id.'Orderway'.
')#i';
foreach ($_GET as $key => $value) {
// only process the filter fields.
if (stripos($key, $this->list_id.'Filter_') !== 0) {
// only process the filter and order by, order way fields.
if (!preg_match($getPrefixPattern, $key)) {
continue;
}