summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-nlbwmon
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-10-02 19:20:53 +0200
committerJo-Philipp Wich <jo@mein.io>2018-10-02 19:20:53 +0200
commitfb859e602b1254c5d199d7f641f6b6717edd01cf (patch)
treed0c1a1b6ac59e80c00fb90e18f40e1d7e3a91bde /applications/luci-app-nlbwmon
parenta90001419e207a9dbe3f78af4363b6e6a1d77530 (diff)
luci-app-nlbwmon: fix nil value concat
Do not concatenate the yet undefined mtime variable to avoid a controller error with backtrace. Fixes: b3642f476 ("luci-app-nlbwmon: add proper file names for json and csv exports.") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'applications/luci-app-nlbwmon')
-rw-r--r--applications/luci-app-nlbwmon/luasrc/controller/nlbw.lua4
1 files changed, 1 insertions, 3 deletions
diff --git a/applications/luci-app-nlbwmon/luasrc/controller/nlbw.lua b/applications/luci-app-nlbwmon/luasrc/controller/nlbw.lua
index d50b77d0f4..0d15bea648 100644
--- a/applications/luci-app-nlbwmon/luasrc/controller/nlbw.lua
+++ b/applications/luci-app-nlbwmon/luasrc/controller/nlbw.lua
@@ -57,8 +57,6 @@ function action_data()
json = "application/json"
}
- local filename = "data." .. mtype
-
local args = { }
local mtype = http.formvalue("type") or "json"
local delim = http.formvalue("delim") or ","
@@ -94,7 +92,7 @@ function action_data()
end
http.prepare_content(types[mtype])
- http.header("Content-Disposition", "attachment; filename=\"%s\"" % filename)
+ http.header("Content-Disposition", "attachment; filename=\"data.%s\"" % mtype)
exec("/usr/sbin/nlbw", args, http.write)
end