summaryrefslogtreecommitdiffstats
path: root/models/repo.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-09-01 07:04:35 -0400
committerUnknwon <u@gogs.io>2015-09-01 07:04:35 -0400
commit7714e792a4ff5b179c24b1db35a5d452716c47f0 (patch)
treee0b0a08395de1d7400faba2d2d303b5d333c8730 /models/repo.go
parent67f07e21f55c599eb335806e054b7d40d28b4e3e (diff)
downloadgitea-7714e792a4ff5b179c24b1db35a5d452716c47f0.tar.gz
gitea-7714e792a4ff5b179c24b1db35a5d452716c47f0.zip
minor fixes on #1551
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 7e662ee42d..aba1037084 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -1105,9 +1105,9 @@ func GetRepositories(uid int64, private bool) ([]*Repository, error) {
}
// GetRecentUpdatedRepositories returns the list of repositories that are recently updated.
-func GetRecentUpdatedRepositories(num int) (repos []*Repository, err error) {
- err = x.Where("is_private=?", false).Limit(num).Desc("updated").Find(&repos)
- return repos, err
+func GetRecentUpdatedRepositories(page int) (repos []*Repository, err error) {
+ return repos, x.Limit(setting.ExplorePagingNum, (page-1)*setting.ExplorePagingNum).
+ Where("is_private=?", false).Limit(setting.ExplorePagingNum).Desc("updated").Find(&repos)
}
// GetRepositoryCount returns the total number of repositories of user.