aboutsummaryrefslogtreecommitdiff
path: root/modules/middleware/context.go
diff options
context:
space:
mode:
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)
}