From e74630ae3b635a43a1bdafcf8b80d2f87b3536b6 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sun, 24 Jul 2016 14:32:46 +0800 Subject: #1384 add pagination for repositories --- models/models.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'models/models.go') diff --git a/models/models.go b/models/models.go index 90fa3f64..758e1e82 100644 --- a/models/models.go +++ b/models/models.go @@ -98,8 +98,8 @@ func LoadConfigs() { func getEngine() (*xorm.Engine, error) { cnnstr := "" var Param string = "?" - if strings.Contains(DbCfg.Name,Param) { - Param="&" + if strings.Contains(DbCfg.Name, Param) { + Param = "&" } switch DbCfg.Type { case "mysql": @@ -206,7 +206,7 @@ func GetStatistic() (stats Statistic) { stats.Counter.User = CountUsers() stats.Counter.Org = CountOrganizations() stats.Counter.PublicKey, _ = x.Count(new(PublicKey)) - stats.Counter.Repo = CountRepositories() + stats.Counter.Repo = CountRepositories(true) stats.Counter.Watch, _ = x.Count(new(Watch)) stats.Counter.Star, _ = x.Count(new(Star)) stats.Counter.Action, _ = x.Count(new(Action)) -- cgit v1.2.3