mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-03 08:54:37 -04:00
minor fixes on #1551
This commit is contained in:
parent
67f07e21f5
commit
7714e792a4
10 changed files with 322 additions and 734 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue