mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Minor naming improvement
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
@@ -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")
|
||||
|
@@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user