diff --git a/module/gitlab/control.php b/module/gitlab/control.php index 23a991f8c1..c506b45f9c 100644 --- a/module/gitlab/control.php +++ b/module/gitlab/control.php @@ -1023,10 +1023,7 @@ class gitlab extends control /* Data sort. */ list($order, $sort) = explode('_', $orderBy); $orderList = array(); - foreach($tagList as $tag) - { - $orderList[] = $tag->$order; - } + foreach($tagList as $tag) $orderList[] = $tag->$order; array_multisort($orderList, $sort == 'desc' ? SORT_DESC : SORT_ASC, $tagList); /* Pager. */ @@ -1035,16 +1032,15 @@ class gitlab extends control $pager = new pager($recTotal, $recPerPage, $pageID); $tagList = array_chunk($tagList, $pager->recPerPage); - $this->view->gitlab = $this->gitlab->getByID($gitlabID); - $this->view->pager = $pager; - $this->view->title = $this->lang->gitlab->common . $this->lang->colon . $this->lang->gitlab->browseTagPriv; - $this->view->levelLang = $this->lang->gitlab->branch->branchCreationLevelList; - $this->view->gitlabID = $gitlabID; - $this->view->projectID = $projectID; - $this->view->keyword = $keyword; - $this->view->project = $this->gitlab->apiGetSingleProject($gitlabID, $projectID); - $this->view->gitlabTagList = empty($tagList) ? $tagList: $tagList[$pageID - 1]; - $this->view->orderBy = $orderBy; + $this->view->gitlab = $this->gitlab->getByID($gitlabID); + $this->view->pager = $pager; + $this->view->title = $this->lang->gitlab->common . $this->lang->colon . $this->lang->gitlab->browseTagPriv; + $this->view->gitlabID = $gitlabID; + $this->view->projectID = $projectID; + $this->view->keyword = $keyword; + $this->view->project = $this->gitlab->apiGetSingleProject($gitlabID, $projectID); + $this->view->gitlabTagList = empty($tagList) ? $tagList: $tagList[$pageID - 1]; + $this->view->orderBy = $orderBy; $this->display(); } diff --git a/module/gitlab/model.php b/module/gitlab/model.php index de7d38d12a..16e301c74d 100644 --- a/module/gitlab/model.php +++ b/module/gitlab/model.php @@ -1535,7 +1535,7 @@ class gitlabModel extends model * @param int $gitlabID * @param int $projectID * @access public - * @return void + * @return array */ public function apiGetTagPrivs($gitlabID, $projectID) { diff --git a/module/gitlab/view/browsetagpriv.html.php b/module/gitlab/view/browsetagpriv.html.php index 2422e598b9..ec8a5bd065 100644 --- a/module/gitlab/view/browsetagpriv.html.php +++ b/module/gitlab/view/browsetagpriv.html.php @@ -60,7 +60,7 @@ name;?> lastCommitter;?> - accessLevel];?> + gitlab->branch->branchCreationLevelList, $gitlabTag->accessLevel);?> name}", " ", '', "title={$lang->gitlab->editTagPriv} class='btn btn-primary'");