From 7368ed108bb64b34a8a4b15f51e6fadd277872e2 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 29 Nov 2021 14:33:44 +0800 Subject: [PATCH] * Finish task #45156. --- module/company/control.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/company/control.php b/module/company/control.php index ae7fb5931c..9052d5c3ad 100644 --- a/module/company/control.php +++ b/module/company/control.php @@ -204,7 +204,8 @@ class company extends control $pager = new pager($recTotal, $recPerPage = 50, $pageID = 1); /* Append id for secend sort. */ - $sort = $this->loadModel('common')->appendOrder('date_desc'); + $order = $direction == 'next' ? 'date_desc' : 'date_asc'; + $sort = $this->loadModel('common')->appendOrder($order); $queryID = ($browseType == 'bysearch') ? (int)$param : 0; $date = empty($date) ? '' : date('Y-m-d', $date);