summaryrefslogtreecommitdiffstats
path: root/models/models.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-07-24 14:32:46 +0800
committerUnknwon <u@gogs.io>2016-07-24 14:32:46 +0800
commite74630ae3b635a43a1bdafcf8b80d2f87b3536b6 (patch)
tree63c5fb32b6ca4417c3dfd9c05f532d5598aa4117 /models/models.go
parent1f2e173a745da8e4b57f96b5561a3c10054d3b76 (diff)
downloadgitea-e74630ae3b635a43a1bdafcf8b80d2f87b3536b6.tar.gz
gitea-e74630ae3b635a43a1bdafcf8b80d2f87b3536b6.zip
#1384 add pagination for repositories
Diffstat (limited to 'models/models.go')
-rw-r--r--models/models.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/models/models.go b/models/models.go
index 90fa3f6465..758e1e8270 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))