* [task#124018] Fix show branch.

This commit is contained in:
liyang
2024-07-25 17:23:10 +08:00
committed by 曹延义
parent 69af3b2f0a
commit 9969445ee9
+3 -3
View File
@@ -1888,14 +1888,14 @@ class repo extends control
list($order, $sort) = explode('_', $orderBy);
$orderList = array();
$keyword = (string)$this->post->keyword;
foreach($branchList as $index => $branch)
foreach($branchList as $index => $orderBranch)
{
if($keyword && strpos($branch->name, $keyword) === false)
if($keyword && strpos($orderBranch->name, $keyword) === false)
{
unset($branchList[$index]);
continue;
}
$orderList[] = $branch->$order;
$orderList[] = $orderBranch->$order;
}
if($orderList) array_multisort($orderList, $sort == 'desc' ? SORT_DESC : SORT_ASC, $branchList);