summaryrefslogtreecommitdiffstats
path: root/modules/middleware
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-03-21 09:24:59 -0400
committerUnknwon <u@gogs.io>2015-03-21 09:24:59 -0400
commit75cbb32b1e9e32093ccb7e2495da7e2eca57e6c9 (patch)
tree478266d404785a717b8376113f6cd045605d5bfe /modules/middleware
parentb6f8b486c79a46219dd1d2f3136c411594cc8f6d (diff)
downloadgitea-75cbb32b1e9e32093ccb7e2495da7e2eca57e6c9.tar.gz
gitea-75cbb32b1e9e32093ccb7e2495da7e2eca57e6c9.zip
UI compatibility
Diffstat (limited to 'modules/middleware')
-rw-r--r--modules/middleware/context.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/modules/middleware/context.go b/modules/middleware/context.go
index dc3b5cad16..6095b4c042 100644
--- a/modules/middleware/context.go
+++ b/modules/middleware/context.go
@@ -180,12 +180,7 @@ func Contexter() macaron.Handler {
Session: sess,
}
// Compute current URL for real-time change language.
- link := setting.AppSubUrl + ctx.Req.RequestURI
- i := strings.Index(link, "?")
- if i > -1 {
- link = link[:i]
- }
- ctx.Data["Link"] = link
+ ctx.Data["Link"] = setting.AppSubUrl + ctx.Req.URL.Path
ctx.Data["PageStartTime"] = time.Now()