mirror of
https://github.com/go-gitea/gitea
synced 2024-11-17 23:54:25 +00:00
Ensure template renderer is available before storage handler (#13982)
`ctx.Error` requires that templates are available for this to render the error page otherwise there will be a panic at this time. This was fixed in #13164 but was not completely backported. Fix #13971 Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
parent
8e8e8ee150
commit
d2b308ae35
@ -223,10 +223,11 @@ func NewMacaron() *macaron.Macaron {
|
||||
},
|
||||
))
|
||||
|
||||
m.Use(templates.HTMLRenderer())
|
||||
|
||||
m.Use(storageHandler(setting.Avatar.Storage, "avatars", storage.Avatars))
|
||||
m.Use(storageHandler(setting.RepoAvatar.Storage, "repo-avatars", storage.RepoAvatars))
|
||||
|
||||
m.Use(templates.HTMLRenderer())
|
||||
mailer.InitMailRender(templates.Mailer())
|
||||
|
||||
localeNames, err := options.Dir("locale")
|
||||
|
Loading…
Reference in New Issue
Block a user