update application/common/controller/Backend.php.

约束排序

Signed-off-by: 御宅男(YznCMS官方) <530765310@qq.com>
pull/523/head
御宅男(YznCMS官方) 2026-03-27 02:49:52 +00:00 committed by Gitee
parent 7bb8672d11
commit becd9c6442
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 1 deletions

View File

@ -507,7 +507,7 @@ class Backend extends Controller
}
$order = [];
foreach ($orderby as $k => $v) {
$order[$v[0]] = $v[1];
$order[$v[0]] = strtoupper($v[1] ?? '') === 'DESC' ? 'DESC' : 'ASC';
}
$field = $field ? $field : 'name';