Fixed: Order by and Order way not working for the lists in the Back office.

This commit is contained in:
vishalsingh.qlo325
2025-12-16 12:48:28 +05:30
parent 41f97a6b9e
commit 55e193790b

View File

@@ -875,9 +875,13 @@ class AdminControllerCore extends Controller
$prefix = $this->getCookieFilterPrefix();
$filters = array();
if (isset($this->list_id)) {
$postPrefixPattern = '#^(' .
preg_quote($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 = '#^(' .
preg_quote($this->list_id, '#') . 'Filter_|' .
'submitFilter|' .
preg_quote($this->list_id, '#') . 'Orderby|' .
preg_quote($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;
}