This commit is contained in:
Unknwon 2014-09-05 17:28:09 -04:00
parent 033a7f0224
commit ab7206d6b7
13 changed files with 121 additions and 59 deletions

View file

@ -972,8 +972,8 @@ func GetRepositories(uid int64, private bool) ([]*Repository, error) {
}
// GetRecentUpdatedRepositories returns the list of repositories that are recently updated.
func GetRecentUpdatedRepositories() (repos []*Repository, err error) {
err = x.Where("is_private=?", false).Limit(5).Desc("updated").Find(&repos)
func GetRecentUpdatedRepositories(num int) (repos []*Repository, err error) {
err = x.Where("is_private=?", false).Limit(num).Desc("updated").Find(&repos)
return repos, err
}