projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aec41da
)
libs/web: add the ability for maps to push error messages to the global page header
author
Jo-Philipp Wich
<jow@openwrt.org>
Sat, 27 Nov 2010 18:17:15 +0000
(18:17 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Sat, 27 Nov 2010 18:17:15 +0000
(18:17 +0000)
libs/web/luasrc/dispatcher.lua
patch
|
blob
|
history
diff --git
a/libs/web/luasrc/dispatcher.lua
b/libs/web/luasrc/dispatcher.lua
index 589cb731f664f5fa95a78eb9ed854b75c4f4784d..3d0db5a21e0fd0b0f6b06181ed99b59dcdd6fa76 100644
(file)
--- a/
libs/web/luasrc/dispatcher.lua
+++ b/
libs/web/luasrc/dispatcher.lua
@@
-725,6
+725,7
@@
local function _cbi(self, ...)
end
local redirect
+ local messages
local applymap = false
local pageaction = true
local parsechain = { }
@@
-745,6
+746,11
@@
local function _cbi(self, ...)
if res.pageaction == false then
pageaction = false
end
+
+ if res.message then
+ messages = messages or { }
+ messages[#messages+1] = res.message
+ end
end
for i, res in ipairs(maps) do
@@
-752,6
+758,7
@@
local function _cbi(self, ...)
firstmap = (i == 1),
applymap = applymap,
redirect = redirect,
+ messages = messages,
pageaction = pageaction,
parsechain = parsechain
})