summaryrefslogtreecommitdiffstats
path: root/routers/admin
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-03-21 04:13:32 -0400
committerUnknown <joe2010xtmf@163.com>2014-03-21 04:13:32 -0400
commite67653cf13857f671de9bf6279453f99cdd60d11 (patch)
treee2e35de1c29cebd2799ecb3d7eb2d5e797ecbbf7 /routers/admin
parentc2816afe9c60922b3468cece689c84e52e0ba11c (diff)
downloadgitea-e67653cf13857f671de9bf6279453f99cdd60d11.tar.gz
gitea-e67653cf13857f671de9bf6279453f99cdd60d11.zip
Bug fix
Diffstat (limited to 'routers/admin')
-rw-r--r--routers/admin/admin.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/routers/admin/admin.go b/routers/admin/admin.go
index 547883f7bc..6d3831a9f3 100644
--- a/routers/admin/admin.go
+++ b/routers/admin/admin.go
@@ -61,7 +61,11 @@ func Config(ctx *middleware.Context) {
ctx.Data["DbCfg"] = models.DbCfg
- ctx.Data["Mailer"] = base.MailService
+ ctx.Data["MailerEnabled"] = false
+ if base.MailService != nil {
+ ctx.Data["MailerEnabled"] = true
+ ctx.Data["Mailer"] = base.MailService
+ }
ctx.HTML(200, "admin/config")
}