diff --git a/module/gitlab/control.php b/module/gitlab/control.php index adadfb9371..52eb02b5fa 100644 --- a/module/gitlab/control.php +++ b/module/gitlab/control.php @@ -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); diff --git a/module/gitlab/lang/en.php b/module/gitlab/lang/en.php index f177bdcf0a..7532e4a3ea 100644 --- a/module/gitlab/lang/en.php +++ b/module/gitlab/lang/en.php @@ -30,7 +30,7 @@ $lang->gitlab->gitlabProject = "GitLab Project"; $lang->gitlab->browseProject = "GitLab Project List"; $lang->gitlab->browseUser = "User List"; $lang->gitlab->browseGroup = "Group List"; -$lang->gitlab->browseBranch = "Branch List"; +$lang->gitlab->browseBranch = "GitLab Branch List"; $lang->gitlab->gitlabIssue = "GitLab Issue"; $lang->gitlab->zentaoProduct = 'Zentao Product'; $lang->gitlab->objectType = 'Type'; // task, bug, story diff --git a/module/gitlab/lang/zh-cn.php b/module/gitlab/lang/zh-cn.php index 74eb3afd9d..4013cfda3b 100644 --- a/module/gitlab/lang/zh-cn.php +++ b/module/gitlab/lang/zh-cn.php @@ -30,7 +30,7 @@ $lang->gitlab->gitlabProject = "{$lang->gitlab->common}项目"; $lang->gitlab->browseProject = "{$lang->gitlab->common}项目列表"; $lang->gitlab->browseUser = "用户列表"; $lang->gitlab->browseGroup = "群组列表"; -$lang->gitlab->browseBranch = "分支列表"; +$lang->gitlab->browseBranch = "GitLab分支列表"; $lang->gitlab->gitlabIssue = "{$lang->gitlab->common} issue"; $lang->gitlab->zentaoProduct = '禅道产品'; $lang->gitlab->objectType = '类型'; // task, bug, story diff --git a/module/gitlab/view/browsebranch.html.php b/module/gitlab/view/browsebranch.html.php index 88e176b95b..dd6448fb4f 100644 --- a/module/gitlab/view/browsebranch.html.php +++ b/module/gitlab/view/browsebranch.html.php @@ -15,7 +15,7 @@