aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/setting/setting.go8
-rw-r--r--modules/template/template.go3
2 files changed, 8 insertions, 3 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 8de205be..cff3e7db 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -246,9 +246,10 @@ var (
// Highlight settings are loaded in modules/template/hightlight.go
// Other settings
- ShowFooterBranding bool
- ShowFooterVersion bool
- SupportMiniWinService bool
+ ShowFooterBranding bool
+ ShowFooterVersion bool
+ ShowFooterTemplateLoadTime bool
+ SupportMiniWinService bool
// Global setting objects
Cfg *ini.File
@@ -571,6 +572,7 @@ func NewContext() {
ShowFooterBranding = Cfg.Section("other").Key("SHOW_FOOTER_BRANDING").MustBool()
ShowFooterVersion = Cfg.Section("other").Key("SHOW_FOOTER_VERSION").MustBool()
+ ShowFooterTemplateLoadTime = Cfg.Section("other").Key("SHOW_FOOTER_TEMPLATE_LOAD_TIME").MustBool()
HasRobotsTxt = com.IsFile(path.Join(CustomPath, "robots.txt"))
}
diff --git a/modules/template/template.go b/modules/template/template.go
index 707697df..3a6eb042 100644
--- a/modules/template/template.go
+++ b/modules/template/template.go
@@ -52,6 +52,9 @@ func NewFuncMap() []template.FuncMap {
"DisableGravatar": func() bool {
return setting.DisableGravatar
},
+ "ShowFooterTemplateLoadTime": func() bool {
+ return setting.ShowFooterTemplateLoadTime
+ },
"LoadTimes": func(startTime time.Time) string {
return fmt.Sprint(time.Since(startTime).Nanoseconds()/1e6) + "ms"
},