summaryrefslogtreecommitdiffstats
path: root/models/repo.go
diff options
context:
space:
mode:
authorEthan Koenig <etk39@cornell.edu>2017-02-26 21:16:35 -0500
committerLunny Xiao <xiaolunwen@gmail.com>2017-02-27 10:16:35 +0800
commit136e6beb0f3c26bdf26711dba49513aa2be3aa2e (patch)
tree3e193927936c69a7082faca4d460ca24a9dd5d85 /models/repo.go
parent50918084bb1788b6c274376490cce8c4cb1bd3bd (diff)
downloadgitea-136e6beb0f3c26bdf26711dba49513aa2be3aa2e.tar.gz
gitea-136e6beb0f3c26bdf26711dba49513aa2be3aa2e.zip
Fix unused Engine bugs (#1064)
Diffstat (limited to 'models/repo.go')
-rw-r--r--models/repo.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/models/repo.go b/models/repo.go
index 2018f4c134..578b54f8a7 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -1734,15 +1734,15 @@ func GetUserMirrorRepositories(userID int64) ([]*Repository, error) {
}
func getRepositoryCount(e Engine, u *User) (int64, error) {
- return x.Count(&Repository{OwnerID: u.ID})
+ return e.Count(&Repository{OwnerID: u.ID})
}
func getPublicRepositoryCount(e Engine, u *User) (int64, error) {
- return x.Where("is_private = ?", false).Count(&Repository{OwnerID: u.ID})
+ return e.Where("is_private = ?", false).Count(&Repository{OwnerID: u.ID})
}
func getPrivateRepositoryCount(e Engine, u *User) (int64, error) {
- return x.Where("is_private = ?", true).Count(&Repository{OwnerID: u.ID})
+ return e.Where("is_private = ?", true).Count(&Repository{OwnerID: u.ID})
}
// GetRepositoryCount returns the total number of repositories of user.