summaryrefslogtreecommitdiffstats
path: root/routers/user
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-08-08 22:43:14 +0800
committerUnknwon <u@gogs.io>2015-08-08 22:43:14 +0800
commitdea3a8c6a42ea7e4921c0e4beee5d4fd0437dbe5 (patch)
tree773b28a72cee24e4a02f3d162de8a37a8f912f59 /routers/user
parentd015d951bd6959f9585d8a83acfe7bba07b7eaad (diff)
downloadgitea-dea3a8c6a42ea7e4921c0e4beee5d4fd0437dbe5.tar.gz
gitea-dea3a8c6a42ea7e4921c0e4beee5d4fd0437dbe5.zip
WIP: create PR - choose branch
Diffstat (limited to 'routers/user')
-rw-r--r--routers/user/home.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/routers/user/home.go b/routers/user/home.go
index c38dba5205..a36483630e 100644
--- a/routers/user/home.go
+++ b/routers/user/home.go
@@ -104,7 +104,7 @@ func Dashboard(ctx *middleware.Context) {
for _, act := range actions {
if act.IsPrivate {
// This prevents having to retrieve the repository for each action
- repo := &models.Repository{Id: act.RepoID, IsPrivate: true}
+ repo := &models.Repository{ID: act.RepoID, IsPrivate: true}
if act.RepoUserName != ctx.User.LowerName {
if has, _ := models.HasAccess(ctx.User, repo, models.ACCESS_MODE_READ); !has {
continue
@@ -212,7 +212,7 @@ func Profile(ctx *middleware.Context) {
continue
}
// This prevents having to retrieve the repository for each action
- repo := &models.Repository{Id: act.RepoID, IsPrivate: true}
+ repo := &models.Repository{ID: act.RepoID, IsPrivate: true}
if act.RepoUserName != ctx.User.LowerName {
if has, _ := models.HasAccess(ctx.User, repo, models.ACCESS_MODE_READ); !has {
continue
@@ -295,21 +295,21 @@ func Issues(ctx *middleware.Context) {
continue
}
- repoIds = append(repoIds, repo.Id)
+ repoIds = append(repoIds, repo.ID)
repo.NumOpenIssues = repo.NumIssues - repo.NumClosedIssues
issueStats.AllCount += int64(repo.NumOpenIssues)
if isShowClosed {
if repo.NumClosedIssues > 0 {
if filterMode == models.FM_CREATE {
- repo.NumClosedIssues = int(models.GetIssueCountByPoster(ctx.User.Id, repo.Id, isShowClosed))
+ repo.NumClosedIssues = int(models.GetIssueCountByPoster(ctx.User.Id, repo.ID, isShowClosed))
}
showRepos = append(showRepos, repo)
}
} else {
if repo.NumOpenIssues > 0 {
if filterMode == models.FM_CREATE {
- repo.NumOpenIssues = int(models.GetIssueCountByPoster(ctx.User.Id, repo.Id, isShowClosed))
+ repo.NumOpenIssues = int(models.GetIssueCountByPoster(ctx.User.Id, repo.ID, isShowClosed))
}
showRepos = append(showRepos, repo)
}
@@ -350,7 +350,7 @@ func Issues(ctx *middleware.Context) {
}
}
- issues[i].Repo, err = models.GetRepositoryById(issues[i].RepoID)
+ issues[i].Repo, err = models.GetRepositoryByID(issues[i].RepoID)
if err != nil {
if models.IsErrRepoNotExist(err) {
log.Warn("GetRepositoryById[%d]: repository not exist", issues[i].RepoID)