diff options
author | Unknwon <u@gogs.io> | 2016-08-17 16:10:07 -0700 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-08-17 16:10:07 -0700 |
commit | ec332cf903354f8ab291ea33962d244a879c330d (patch) | |
tree | 17ad5b632b022ecd840fc140dabbd904b762ff4e /modules | |
parent | 2c5411b00cc376e6e4307ebbe47fed4bbfafddb2 (diff) | |
download | gitea-ec332cf903354f8ab291ea33962d244a879c330d.tar.gz gitea-ec332cf903354f8ab291ea33962d244a879c330d.zip |
Minor naming improvement
Diffstat (limited to 'modules')
-rw-r--r-- | modules/context/auth.go | 4 | ||||
-rw-r--r-- | modules/setting/setting.go | 9 | ||||
-rw-r--r-- | modules/sync/single_instance_pool.go | 2 |
3 files changed, 9 insertions, 6 deletions
diff --git a/modules/context/auth.go b/modules/context/auth.go index bc19467d44..746771791e 100644 --- a/modules/context/auth.go +++ b/modules/context/auth.go @@ -37,8 +37,8 @@ func Toggle(options *ToggleOptions) macaron.Handler { } // Check non-logged users landing page. - if !ctx.IsSigned && ctx.Req.RequestURI == "/" && setting.LandingPageUrl != setting.LANDING_PAGE_HOME { - ctx.Redirect(setting.AppSubUrl + string(setting.LandingPageUrl)) + if !ctx.IsSigned && ctx.Req.RequestURI == "/" && setting.LandingPageURL != setting.LANDING_PAGE_HOME { + ctx.Redirect(setting.AppSubUrl + string(setting.LandingPageURL)) return } diff --git a/modules/setting/setting.go b/modules/setting/setting.go index fe9c854953..1128e08ed0 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -46,7 +46,7 @@ const ( ) var ( - // Build information + // Build information should only be set by -ldflags. BuildTime string BuildGitHash string @@ -69,7 +69,7 @@ var ( CertFile, KeyFile string StaticRootPath string EnableGzip bool - LandingPageUrl LandingPage + LandingPageURL LandingPage UnixSocketPermission uint32 SSH struct { @@ -258,6 +258,7 @@ var ( HasRobotsTxt bool ) +// DateLang transforms standard language locale name to corresponding value in datetime plugin. func DateLang(lang string) string { name, ok := dateLangs[lang] if ok { @@ -407,9 +408,9 @@ func NewContext() { switch sec.Key("LANDING_PAGE").MustString("home") { case "explore": - LandingPageUrl = LANDING_PAGE_EXPLORE + LandingPageURL = LANDING_PAGE_EXPLORE default: - LandingPageUrl = LANDING_PAGE_HOME + LandingPageURL = LANDING_PAGE_HOME } SSH.RootPath = path.Join(homeDir, ".ssh") diff --git a/modules/sync/single_instance_pool.go b/modules/sync/single_instance_pool.go index 4a00d5283d..01d95fd0b5 100644 --- a/modules/sync/single_instance_pool.go +++ b/modules/sync/single_instance_pool.go @@ -24,6 +24,8 @@ type SingleInstancePool struct { // count maintains the number of times an instance with same identity checks in // to the pool, and should be reduced to 0 (removed from map) by checking out // with same number of times. + // The purpose of count is to delete lock when count down to 0 and recycle memory + // from map object. count map[string]int } |