summaryrefslogtreecommitdiffstats
path: root/models/repo.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-09-06 08:54:08 -0400
committerUnknwon <u@gogs.io>2015-09-06 08:54:08 -0400
commitaa67de910af6246a6dc9ad96c56f789e282e8403 (patch)
treec845cd7afe587d341a091507d2f08310a816e509 /models/repo.go
parent24658fcbdd507bd66cd76b6ca96e1ef5e1c15af5 (diff)
downloadgitea-aa67de910af6246a6dc9ad96c56f789e282e8403.tar.gz
gitea-aa67de910af6246a6dc9ad96c56f789e282e8403.zip
fix #1558
Diffstat (limited to 'models/repo.go')
-rw-r--r--models/repo.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/models/repo.go b/models/repo.go
index d0fa7c8fc6..2835b6f9e3 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -1190,9 +1190,13 @@ func GetRecentUpdatedRepositories(page int) (repos []*Repository, err error) {
Where("is_private=?", false).Limit(setting.ExplorePagingNum).Desc("updated").Find(&repos)
}
+func getRepositoryCount(e Engine, u *User) (int64, error) {
+ return x.Count(&Repository{OwnerID: u.Id})
+}
+
// GetRepositoryCount returns the total number of repositories of user.
func GetRepositoryCount(u *User) (int64, error) {
- return x.Count(&Repository{OwnerID: u.Id})
+ return getRepositoryCount(x, u)
}
type SearchOption struct {