diff --git a/gogs.go b/gogs.go index 86e972579e..d0a02449c4 100644 --- a/gogs.go +++ b/gogs.go @@ -17,7 +17,7 @@ import ( "github.com/gogits/gogs/modules/setting" ) -const APP_VER = "0.4.0.0530 Alpha" +const APP_VER = "0.4.0.0531 Alpha" func init() { runtime.GOMAXPROCS(runtime.NumCPU()) diff --git a/modules/social/social.go b/modules/social/social.go index b2f61f03fb..62f4d51835 100644 --- a/modules/social/social.go +++ b/modules/social/social.go @@ -67,7 +67,6 @@ func NewOauthService() { TokenURL: setting.OauthService.OauthInfos[name].TokenUrl, } } - enabledOauths := make([]string, 0, 10) // GitHub. diff --git a/routers/user/user.go b/routers/user/user.go index bdcd524152..a5b3e79253 100644 --- a/routers/user/user.go +++ b/routers/user/user.go @@ -26,6 +26,11 @@ func SignIn(ctx *middleware.Context) { return } + if setting.OauthService != nil { + ctx.Data["OauthEnabled"] = true + ctx.Data["OauthService"] = setting.OauthService + } + // Check auto-login. userName := ctx.GetCookie(setting.CookieUserName) if len(userName) == 0 { @@ -33,11 +38,6 @@ func SignIn(ctx *middleware.Context) { return } - if setting.OauthService != nil { - ctx.Data["OauthEnabled"] = true - ctx.Data["OauthService"] = setting.OauthService - } - isSucceed := false defer func() { if !isSucceed { diff --git a/templates/VERSION b/templates/VERSION index 61da4c61ad..19ed9971d8 100644 --- a/templates/VERSION +++ b/templates/VERSION @@ -1 +1 @@ -0.4.0.0530 Alpha \ No newline at end of file +0.4.0.0531 Alpha \ No newline at end of file