fix #1957 - disable version display
This allows the admin to disable the version information about gogs and go in use in the footer.
This commit is contained in:
parent
efea642d6c
commit
56006da34b
5 changed files with 11 additions and 6 deletions
|
@ -245,6 +245,7 @@ func Contexter() macaron.Handler {
|
|||
|
||||
ctx.Data["ShowRegistrationButton"] = setting.Service.ShowRegistrationButton
|
||||
ctx.Data["ShowFooterBranding"] = setting.ShowFooterBranding
|
||||
ctx.Data["ShowFooterVersion"] = setting.ShowFooterVersion
|
||||
|
||||
c.Map(ctx)
|
||||
}
|
||||
|
|
|
@ -178,6 +178,7 @@ var (
|
|||
|
||||
// Other settings.
|
||||
ShowFooterBranding bool
|
||||
ShowFooterVersion bool
|
||||
|
||||
// Global setting objects.
|
||||
Cfg *ini.File
|
||||
|
@ -425,6 +426,7 @@ func NewContext() {
|
|||
dateLangs = Cfg.Section("i18n.datelang").KeysHash()
|
||||
|
||||
ShowFooterBranding = Cfg.Section("other").Key("SHOW_FOOTER_BRANDING").MustBool()
|
||||
EnableShowVersion = Cfg.Section("other").Key("ENABLE_SHOW_VERSION").MustBool()
|
||||
|
||||
HasRobotsTxt = com.IsFile(path.Join(CustomPath, "robots.txt"))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue