diff --git a/module/gitlab/control.php b/module/gitlab/control.php index 1205ae7709..c2bb8444fd 100644 --- a/module/gitlab/control.php +++ b/module/gitlab/control.php @@ -188,6 +188,7 @@ class gitlab extends control $this->view->title = $this->lang->gitlab->bindUser; $this->view->userPairs = $userPairs; $this->view->gitlabUsers = $this->gitlab->apiGetUsers($gitlabID); + $this->view->bindedUsers = $this->gitlab->getUserAccountIdPairs($gitlabID); $this->view->matchedResult = $this->gitlab->getMatchedUsers($gitlabID, $this->view->gitlabUsers, $zentaoUsers); $this->display(); } diff --git a/module/gitlab/lang/en.php b/module/gitlab/lang/en.php index 7bbf2594fd..e59955a3b9 100644 --- a/module/gitlab/lang/en.php +++ b/module/gitlab/lang/en.php @@ -13,6 +13,8 @@ $lang->gitlab->delete = 'Delete GitLab'; $lang->gitlab->confirmDelete = 'Do you want to delete this GitLab server?'; $lang->gitlab->gitlabAccount = 'GitLab Account'; $lang->gitlab->zentaoAccount = 'Zentao Account'; +$lang->gitlab->bindingStatus = 'Binding Status'; +$lang->gitlab->binded = 'Binded'; $lang->gitlab->serverFail = 'Conntect to GitLab server failed, please check the GitLab server.'; $lang->gitlab->browseAction = 'GitLab List'; diff --git a/module/gitlab/lang/zh-cn.php b/module/gitlab/lang/zh-cn.php index 9467979803..8df7c03543 100644 --- a/module/gitlab/lang/zh-cn.php +++ b/module/gitlab/lang/zh-cn.php @@ -13,6 +13,8 @@ $lang->gitlab->delete = '删除GitLab'; $lang->gitlab->confirmDelete = '确认删除该GitLab吗?'; $lang->gitlab->gitlabAccount = 'GitLab用户'; $lang->gitlab->zentaoAccount = '禅道用户'; +$lang->gitlab->bindingStatus = '绑定状态'; +$lang->gitlab->binded = '已绑定'; $lang->gitlab->serverFail = '连接GitLab服务器异常,请检查GitLab服务器。'; $lang->gitlab->browseAction = 'GitLab列表'; diff --git a/module/gitlab/lang/zh-tw.php b/module/gitlab/lang/zh-tw.php index 1bde16089f..a90f58282d 100644 --- a/module/gitlab/lang/zh-tw.php +++ b/module/gitlab/lang/zh-tw.php @@ -13,6 +13,8 @@ $lang->gitlab->delete = '刪除GitLab'; $lang->gitlab->confirmDelete = '確認刪除該GitLab嗎?'; $lang->gitlab->gitlabAccount = 'GitLab用戶'; $lang->gitlab->zentaoAccount = '禪道用戶'; +$lang->gitlab->bindingStatus = '綁定狀態'; +$lang->gitlab->binded = '已綁定'; $lang->gitlab->serverFail = '連接GitLab伺服器異常,請檢查GitLab伺服器。'; $lang->gitlab->browseAction = 'GitLab列表'; diff --git a/module/gitlab/model.php b/module/gitlab/model.php index ebd830ad5f..ba4a250da3 100644 --- a/module/gitlab/model.php +++ b/module/gitlab/model.php @@ -85,30 +85,30 @@ class gitlabModel extends model /** * Get gitlab user id and zentao account pairs of one gitlab. * - * @param int $gitlab + * @param int $gitlabID * @access public * @return array */ - public function getUserIdAccountPairs($gitlab) + public function getUserIdAccountPairs($gitlabID) { return $this->dao->select('openID,account')->from(TABLE_OAUTH) ->where('providerType')->eq('gitlab') - ->andWhere('providerID')->eq($gitlab) + ->andWhere('providerID')->eq($gitlabID) ->fetchPairs(); } /** * Get zentao account gitlab user id pairs of one gitlab. * - * @param int $gitlab + * @param int $gitlabID * @access public * @return array */ - public function getUserAccountIdPairs($gitlab) + public function getUserAccountIdPairs($gitlabID) { return $this->dao->select('account,openID')->from(TABLE_OAUTH) ->where('providerType')->eq('gitlab') - ->andWhere('providerID')->eq($gitlab) + ->andWhere('providerID')->eq($gitlabID) ->fetchPairs(); } diff --git a/module/gitlab/view/binduser.html.php b/module/gitlab/view/binduser.html.php index fec3c08652..f360ac8c3c 100644 --- a/module/gitlab/view/binduser.html.php +++ b/module/gitlab/view/binduser.html.php @@ -22,6 +22,7 @@