summaryrefslogtreecommitdiffstats
path: root/modules/middleware/context.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/middleware/context.go')
-rw-r--r--modules/middleware/context.go8
1 files changed, 0 insertions, 8 deletions
diff --git a/modules/middleware/context.go b/modules/middleware/context.go
index 90716d2c59..86e98c9071 100644
--- a/modules/middleware/context.go
+++ b/modules/middleware/context.go
@@ -29,7 +29,6 @@ import (
// Context represents context of a request.
type Context struct {
*macaron.Context
- i18n.Locale
Cache cache.Cache
csrf csrf.CSRF
Flash *session.Flash
@@ -76,12 +75,6 @@ type Context struct {
}
}
-// Query querys form parameter.
-func (ctx *Context) Query(name string) string {
- ctx.Req.ParseForm()
- return ctx.Req.Form.Get(name)
-}
-
// HasError returns true if error occurs in form validation.
func (ctx *Context) HasApiError() bool {
hasErr, ok := ctx.Data["HasError"]
@@ -162,7 +155,6 @@ func Contexter() macaron.Handler {
return func(c *macaron.Context, l i18n.Locale, cache cache.Cache, sess session.Store, f *session.Flash, x csrf.CSRF) {
ctx := &Context{
Context: c,
- Locale: l,
Cache: cache,
csrf: x,
Flash: f,