summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-07-26 18:37:18 -0400
committerUnknwon <joe2010xtmf@163.com>2014-07-26 18:37:18 -0400
commit5e8138341357f367868a32b631495c9d5a286477 (patch)
treefb36040422534e051ac381cde594ff1a208e4195 /routers
parent02a81ddb6252d1a08900d548ddb63e41bcb0b8ef (diff)
downloadgitea-5e8138341357f367868a32b631495c9d5a286477.tar.gz
gitea-5e8138341357f367868a32b631495c9d5a286477.zip
Git installation check, show image in single file view, show short SHA1 instead of 40-length string, complete log module
Diffstat (limited to 'routers')
-rw-r--r--routers/install.go5
-rw-r--r--routers/user/home.go4
2 files changed, 3 insertions, 6 deletions
diff --git a/routers/install.go b/routers/install.go
index 516d11e4aa..c63ac6909c 100644
--- a/routers/install.go
+++ b/routers/install.go
@@ -54,11 +54,12 @@ func GlobalInit() {
log.Trace("Log path: %s", setting.LogRootPath)
mailer.NewMailerContext()
models.LoadModelsConfig()
- models.LoadRepoConfig()
- models.NewRepoContext()
NewServices()
if setting.InstallLock {
+ models.LoadRepoConfig()
+ models.NewRepoContext()
+
if err := models.NewEngine(); err != nil {
log.Fatal(4, "Fail to initialize ORM engine: %v", err)
}
diff --git a/routers/user/home.go b/routers/user/home.go
index b5a789ae0e..186cbe41a7 100644
--- a/routers/user/home.go
+++ b/routers/user/home.go
@@ -32,7 +32,6 @@ func Dashboard(ctx *middleware.Context) {
ctx.Handle(500, "home.Dashboard(GetOrganizations)", err)
return
}
- ctx.Data["Orgs"] = ctx.User.Orgs
ctx.Data["ContextUser"] = ctx.User
repos, err := models.GetRepositories(ctx.User.Id, true)
@@ -40,9 +39,6 @@ func Dashboard(ctx *middleware.Context) {
ctx.Handle(500, "GetRepositories", err)
return
}
- for _, repo := range repos {
- repo.Owner = ctx.User
- }
ctx.Data["Repos"] = repos
ctx.Data["CollaborativeRepos"], err = models.GetCollaborativeRepos(ctx.User.Name)