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:
Gibheer 2015-11-18 22:32:31 +01:00
parent efea642d6c
commit 56006da34b
5 changed files with 11 additions and 6 deletions

View file

@ -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)
}

View file

@ -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"))
}