From 56a23c609c30cf6c477bf6523661a44821da1819 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Tue, 3 Jun 2008 18:02:53 +0000 Subject: [PATCH] * libs/web: Added support for custom query strings --- libs/web/luasrc/http.lua | 10 ++++++++++ .../luasrc/view/themes/fledermaus/header.htm | 11 ++++++++--- .../luasrc/view/themes/openwrt.org/header.htm | 13 +++++++++---- 3 files changed, 27 insertions(+), 7 deletions(-) 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 diff --git a/themes/fledermaus/luasrc/view/themes/fledermaus/header.htm b/themes/fledermaus/luasrc/view/themes/fledermaus/header.htm index 99bd39924..cb378555f 100644 --- a/themes/fledermaus/luasrc/view/themes/fledermaus/header.htm +++ b/themes/fledermaus/luasrc/view/themes/fledermaus/header.htm @@ -73,9 +73,12 @@ local function submenu(prefix, node) %>