diff options
author | Unknown <joe2010xtmf@163.com> | 2014-05-31 17:15:04 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-05-31 17:15:04 -0400 |
commit | 2657f88d9af9420329c49fab20bd1c7a5febc071 (patch) | |
tree | b6f403b9f403e4f639ddde6c337d57523e44a648 | |
parent | ddb7f55035216193a18c713b3536fba10543b04d (diff) | |
download | gitea-2657f88d9af9420329c49fab20bd1c7a5febc071.tar.gz gitea-2657f88d9af9420329c49fab20bd1c7a5febc071.zip |
Fix #222
-rw-r--r-- | gogs.go | 2 | ||||
-rw-r--r-- | modules/social/social.go | 1 | ||||
-rw-r--r-- | routers/user/user.go | 10 | ||||
-rw-r--r-- | templates/VERSION | 2 |
4 files changed, 7 insertions, 8 deletions
@@ -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 |