* Code for task#45500

This commit is contained in:
zenggang
2021-12-08 02:39:08 +00:00
parent 0de19226e5
commit 131a9ef165
5 changed files with 12 additions and 10 deletions
+7 -2
View File
@@ -724,7 +724,7 @@ class gitlab extends control
* @access public
* @return void
*/
public function browseBranch($gitlabID, $projectID, $orderBy = 'name_desc', $recTotal = 0, $recPerPage = 15, $pageID = 1)
public function browseBranch($gitlabID, $projectID, $orderBy = 'name_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
$this->session->set('gitlabBranchList', $this->app->getURI(true));
@@ -742,7 +742,12 @@ class gitlab extends control
/* Data sort. */
list($order, $sort) = explode('_', $orderBy);
array_multisort(array_column($branchList, $order), $sort == 'desc' ? SORT_DESC : SORT_ASC, $branchList);
$orderList = array();
foreach($branchList as $branch)
{
$orderList[] = $branch->$order;
}
array_multisort($orderList, $sort == 'desc' ? SORT_DESC : SORT_ASC, $branchList);
/* Pager. */
$this->app->loadClass('pager', $static = true);