projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
98842cc
)
lua-runtime: template: fix "tpl" refactoring
author
Karl Palsson
<karlp@etactica.com>
Tue, 8 Nov 2022 15:23:10 +0000
(15:23 +0000)
committer
Karl Palsson
<karlp@etactica.com>
Tue, 8 Nov 2022 15:23:10 +0000
(15:23 +0000)
This fixes crashes on "tpl" being undefined.
Signed-off-by: Karl Palsson <karlp@etactica.com>
modules/luci-lua-runtime/luasrc/template.lua
patch
|
blob
|
history
diff --git
a/modules/luci-lua-runtime/luasrc/template.lua
b/modules/luci-lua-runtime/luasrc/template.lua
index b7cc56e1cc0d676e35d313880bb39976a1c7a25d..b6b9af0badb8914412eb237a0e59b509b9b11b1e 100644
(file)
--- a/
modules/luci-lua-runtime/luasrc/template.lua
+++ b/
modules/luci-lua-runtime/luasrc/template.lua
@@
-95,7
+95,7
@@
context.viewns = setmetatable({
end;
translate = i18n.translate;
translatef = i18n.translatef;
- export = function(k, v) if
tpl.context.viewns[k] == nil then tpl.
context.viewns[k] = v end end;
+ export = function(k, v) if
context.viewns[k] == nil then
context.viewns[k] = v end end;
striptags = xml.striptags;
pcdata = xml.pcdata;
ifattr = function(...) return _ifattr(...) end;