aboutsummaryrefslogtreecommitdiff
path: root/modules/middleware/context.go
diff options
context:
space:
mode:
authorEmrah URHAN <raxetul@gmail.com>2015-11-22 19:40:18 +0200
committerEmrah URHAN <raxetul@gmail.com>2015-11-22 19:40:18 +0200
commit737da1a3748d7c82af771d3ba4aa4c76ba219eee (patch)
treeb59104944ba28771752adcc1231a847b6704ac4d /modules/middleware/context.go
parentf63a468dfce812423b78a47cfa2583c5ad2faa49 (diff)
parentefaf60ba5a4a7c0954dbaf57203859db3258281f (diff)
Latest develop updates is merged with my RaspberryPi Dockerfile version.
Merge branch 'develop' of https://github.com/gogits/gogs into develop
Diffstat (limited to 'modules/middleware/context.go')
-rw-r--r--modules/middleware/context.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/modules/middleware/context.go b/modules/middleware/context.go
index dffebe6f..4b217b63 100644
--- a/modules/middleware/context.go
+++ b/modules/middleware/context.go
@@ -205,18 +205,10 @@ func Contexter() macaron.Handler {
Session: sess,
}
// Compute current URL for real-time change language.
- ctx.Data["Link"] = setting.AppSubUrl + ctx.Req.URL.Path
+ ctx.Data["Link"] = setting.AppSubUrl + strings.TrimSuffix(ctx.Req.URL.Path, "/")
ctx.Data["PageStartTime"] = time.Now()
- // Check auto-signin.
- if sess.Get("uid") == nil {
- if _, err := AutoSignIn(ctx); err != nil {
- ctx.Handle(500, "AutoSignIn", err)
- return
- }
- }
-
// Get user from session if logined.
ctx.User, ctx.IsBasicAuth = auth.SignedInUser(ctx.Context, ctx.Session)
@@ -245,6 +237,7 @@ func Contexter() macaron.Handler {
ctx.Data["ShowRegistrationButton"] = setting.Service.ShowRegistrationButton
ctx.Data["ShowFooterBranding"] = setting.ShowFooterBranding
+ ctx.Data["ShowFooterVersion"] = setting.ShowFooterVersion
c.Map(ctx)
}