summaryrefslogtreecommitdiffstats
path: root/modules/base/template.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-05-25 20:11:25 -0400
committerUnknown <joe2010xtmf@163.com>2014-05-25 20:11:25 -0400
commit688ec6ecbdf0e1c450aa93fdc4d760c4ae63a73f (patch)
tree8adb59c369d1fe1bd41ae7be38785dc613a29a91 /modules/base/template.go
parent87854c95a90cf1bebe1bffb833389471fb35f234 (diff)
downloadgitea-688ec6ecbdf0e1c450aa93fdc4d760c4ae63a73f.tar.gz
gitea-688ec6ecbdf0e1c450aa93fdc4d760c4ae63a73f.zip
Fixed #209
Diffstat (limited to 'modules/base/template.go')
-rw-r--r--modules/base/template.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/base/template.go b/modules/base/template.go
index 5aa8ac5cc8..8df8d82498 100644
--- a/modules/base/template.go
+++ b/modules/base/template.go
@@ -13,6 +13,8 @@ import (
"runtime"
"strings"
"time"
+
+ "github.com/gogits/gogs/modules/setting"
)
func Str2html(raw string) template.HTML {
@@ -52,16 +54,16 @@ var TemplateFuncs template.FuncMap = map[string]interface{}{
return runtime.Version()
},
"AppName": func() string {
- return AppName
+ return setting.AppName
},
"AppVer": func() string {
- return AppVer
+ return setting.AppVer
},
"AppDomain": func() string {
- return Domain
+ return setting.Domain
},
"CdnMode": func() bool {
- return ProdMode && !OfflineMode
+ return setting.ProdMode && !setting.OfflineMode
},
"LoadTimes": func(startTime time.Time) string {
return fmt.Sprint(time.Since(startTime).Nanoseconds()/1e6) + "ms"