Fix install bugs

This commit is contained in:
Unknown 2014-03-30 11:58:21 -04:00
parent 9f91dee53f
commit 3698431fc1
2 changed files with 19 additions and 0 deletions

View file

@ -21,6 +21,11 @@ type ToggleOptions struct {
func Toggle(options *ToggleOptions) martini.Handler {
return func(ctx *Context) {
if !base.InstallLock {
ctx.Redirect("/install")
return
}
if options.SignOutRequire && ctx.IsSigned && ctx.Req.RequestURI != "/" {
ctx.Redirect("/")
return