mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-09-20 10:48:00 +08:00
bugfix: 1. 修复私有问题访问bug;2. 重构私有文档访问逻辑代码;3. shell生成zip包中,删除go文件。 resolves mindoc-org/mindoc#751, resolves mindoc-org/mindoc#801
This commit is contained in:
@@ -190,8 +190,9 @@ func (c *BaseController) ShowErrorPage(errCode int, errMsg string) {
|
||||
c.Data["ErrorCode"] = errCode
|
||||
|
||||
var buf bytes.Buffer
|
||||
exeData := map[string]interface{}{"ErrorMessage": errMsg, "ErrorCode": errCode, "BaseUrl": conf.BaseUrl, "Lang": c.Lang}
|
||||
|
||||
if err := web.ExecuteViewPathTemplate(&buf, "errors/error.tpl", web.BConfig.WebConfig.ViewsPath, map[string]interface{}{"ErrorMessage": errMsg, "ErrorCode": errCode, "BaseUrl": conf.BaseUrl}); err != nil {
|
||||
if err := web.ExecuteViewPathTemplate(&buf, "errors/error.tpl", web.BConfig.WebConfig.ViewsPath, exeData); err != nil {
|
||||
c.Abort("500")
|
||||
}
|
||||
if errCode >= 200 && errCode <= 510 {
|
||||
|
Reference in New Issue
Block a user