From 56a23c609c30cf6c477bf6523661a44821da1819 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Tue, 3 Jun 2008 18:02:53 +0000 Subject: * libs/web: Added support for custom query strings --- libs/web/luasrc/http.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libs') diff --git a/libs/web/luasrc/http.lua b/libs/web/luasrc/http.lua index fa8821c5a..68dad8f1e 100644 --- a/libs/web/luasrc/http.lua +++ b/libs/web/luasrc/http.lua @@ -33,4 +33,14 @@ if ENV and ENV.HASERLVER then require("luci.sgi.haserl") elseif webuci then require("luci.sgi.webuci") +end + +function build_querystring(table) + local s="?" + + for k, v in pairs(table) do + s = s .. k .. "=" .. v .. "&" + end + + return s end \ No newline at end of file -- cgit v1.2.3