diff options
author | skyblue <ssx205@gmail.com> | 2014-04-12 01:01:40 +0800 |
---|---|---|
committer | skyblue <ssx205@gmail.com> | 2014-04-12 01:01:40 +0800 |
commit | 4c6e0e94995b95d3493c6641fbb5a528c6d6c134 (patch) | |
tree | 5812901884c131811a5ffed684cf9bfced8a6a33 /modules | |
parent | dd815ae7b532ceba1f96e6751e231dc351eb19b9 (diff) | |
parent | a5fcaae5ee550ef28a77b9387f6c75192ef1a88a (diff) |
Merge branch 'dev' of github.com:gogits/gogs into dev
Diffstat (limited to 'modules')
-rw-r--r-- | modules/base/template.go | 3 | ||||
-rw-r--r-- | modules/middleware/context.go | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/modules/base/template.go b/modules/base/template.go index 5a42107c..62414979 100644 --- a/modules/base/template.go +++ b/modules/base/template.go @@ -67,6 +67,9 @@ var TemplateFuncs template.FuncMap = map[string]interface{}{ "TimeSince": TimeSince, "FileSize": FileSize, "Subtract": Subtract, + "Add": func(a, b int) int { + return a + b + }, "ActionIcon": ActionIcon, "ActionDesc": ActionDesc, "DateFormat": DateFormat, diff --git a/modules/middleware/context.go b/modules/middleware/context.go index 6ee94b96..e7f962c3 100644 --- a/modules/middleware/context.go +++ b/modules/middleware/context.go @@ -103,7 +103,7 @@ func (ctx *Context) RenderWithErr(msg, tpl string, form auth.Form) { func (ctx *Context) Handle(status int, title string, err error) { log.Error("%s: %v", title, err) if martini.Dev == martini.Prod { - ctx.HTML(500, "status/500") + ctx.HTML(200, "status/500") return } |