diff options
Diffstat (limited to 'modules/setting')
-rw-r--r-- | modules/setting/setting.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go index 79001407..12fd52c9 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -130,6 +130,9 @@ var ( // I18n settings. Langs, Names []string + // Other settings. + ShowFooterBranding bool + // Global setting objects. Cfg *ini.File CustomPath string // Custom directory path. @@ -319,6 +322,9 @@ func NewConfigContext() { GravatarSource = "//1.gravatar.com/avatar/" } DisableGravatar = sec.Key("DISABLE_GRAVATAR").MustBool() + if OfflineMode { + DisableGravatar = true + } if err = Cfg.Section("git").MapTo(&Git); err != nil { log.Fatal(4, "Fail to map Git settings: %v", err) @@ -327,6 +333,8 @@ func NewConfigContext() { Langs = Cfg.Section("i18n").Key("LANGS").Strings(",") Names = Cfg.Section("i18n").Key("NAMES").Strings(",") + ShowFooterBranding = Cfg.Section("other").Key("SHOW_FOOTER_BRANDING").MustBool() + HasRobotsTxt = com.IsFile(path.Join(CustomPath, "robots.txt")) } |