From a9a40187118abaed209bcf645444df77f7f0ae75 Mon Sep 17 00:00:00 2001 From: lifei6671 Date: Fri, 14 Sep 2018 18:42:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E5=A4=87=E6=A1=88?= =?UTF-8?q?=E5=8F=B7=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controllers/BaseController.go | 8 ++------ views/widgets/footer.tpl | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/controllers/BaseController.go b/controllers/BaseController.go index e17e29c7..ebc09016 100644 --- a/controllers/BaseController.go +++ b/controllers/BaseController.go @@ -68,12 +68,8 @@ func (c *BaseController) Prepare() { c.Data[item.OptionName] = item.OptionValue c.Option[item.OptionName] = item.OptionValue - if strings.EqualFold(item.OptionName, "ENABLE_ANONYMOUS") && item.OptionValue == "true" { - c.EnableAnonymous = true - } - if strings.EqualFold(item.OptionName, "ENABLE_DOCUMENT_HISTORY") && item.OptionValue == "true" { - c.EnableDocumentHistory = true - } + c.EnableAnonymous = strings.EqualFold(item.OptionName, "ENABLE_ANONYMOUS") && item.OptionValue == "true" + c.EnableDocumentHistory = strings.EqualFold(item.OptionName, "ENABLE_DOCUMENT_HISTORY") && item.OptionValue == "true" } } c.Data["HighlightStyle"] = beego.AppConfig.DefaultString("highlight_style","github") diff --git a/views/widgets/footer.tpl b/views/widgets/footer.tpl index 7f077d8f..5c880d4e 100644 --- a/views/widgets/footer.tpl +++ b/views/widgets/footer.tpl @@ -9,7 +9,7 @@  ·  使用手册 - {{if ne .site_beian ""}} + {{if .site_beian}}
{{.site_beian}}