From: Karl Palsson Date: Mon, 6 Jul 2020 17:35:14 +0000 (+0000) Subject: error404: flow message into template X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=48715ba5c8ccec4bfe326b1de612d7056d161000;p=openwrt-luci.git error404: flow message into template message was only being shown in the plain text case when the render failed. Signed-off-by: Karl Palsson --- diff --git a/modules/luci-base/luasrc/dispatcher.lua b/modules/luci-base/luasrc/dispatcher.lua index 57b4e12d17..6e62e25308 100644 --- a/modules/luci-base/luasrc/dispatcher.lua +++ b/modules/luci-base/luasrc/dispatcher.lua @@ -394,7 +394,7 @@ function error404(message) local function render() local template = require "luci.template" - template.render("error404") + template.render("error404", {message=message}) end if not util.copcall(render) then diff --git a/modules/luci-base/luasrc/view/error404.htm b/modules/luci-base/luasrc/view/error404.htm index a762f6038b..ff151d1834 100644 --- a/modules/luci-base/luasrc/view/error404.htm +++ b/modules/luci-base/luasrc/view/error404.htm @@ -7,5 +7,6 @@ <%+header%>

404 <%:Not Found%>

<%:Sorry, the object you requested was not found.%>

+

<%=message%>

<%:Unable to dispatch%>: <%=url(unpack(luci.dispatcher.context.request))%> <%+footer%>