Browse Source

Mirror fix

pull/310/head
Unknwon 11 years ago
parent
commit
a41a1fe60d
  1. 6
      modules/middleware/context.go
  2. 1
      modules/setting/setting.go

6
modules/middleware/context.go

@ -139,10 +139,6 @@ func (ctx *Context) Handle(status int, title string, err error) {
ctx.HTML(status, base.TplName(fmt.Sprintf("status/%d", status))) ctx.HTML(status, base.TplName(fmt.Sprintf("status/%d", status)))
} }
func (ctx *Context) Debug(msg string, args ...interface{}) {
log.Debug(msg, args...)
}
func (ctx *Context) GetCookie(name string) string { func (ctx *Context) GetCookie(name string) string {
cookie, err := ctx.Req.Cookie(name) cookie, err := ctx.Req.Cookie(name)
if err != nil { if err != nil {
@ -356,7 +352,7 @@ func InitContext() martini.Handler {
ctx.Session.SessionRelease(res) ctx.Session.SessionRelease(res)
if flash := ctx.Flash.Encode(); len(flash) > 0 { if flash := ctx.Flash.Encode(); len(flash) > 0 {
ctx.SetCookie("gogs_flash", ctx.Flash.Encode(), 0) ctx.SetCookie("gogs_flash", flash, 0)
} }
}) })

1
modules/setting/setting.go

@ -341,6 +341,7 @@ func newSessionService() {
log.Fatal("Init session system failed, provider: %s, %v", log.Fatal("Init session system failed, provider: %s, %v",
SessionProvider, err) SessionProvider, err)
} }
go SessionManager.GC()
log.Info("Session Service Enabled") log.Info("Session Service Enabled")
} }

Loading…
Cancel
Save