luci-app-passwall2: sync upstream
This commit is contained in:
parent
b1cbfa1c81
commit
3da2d267bd
@ -5,7 +5,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall2
|
||||
PKG_VERSION:=1.28-4
|
||||
PKG_VERSION:=1.28-5
|
||||
PKG_RELEASE:=
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
|
@ -114,20 +114,25 @@ local api = require "luci.passwall2.api"
|
||||
}
|
||||
return ret;
|
||||
},
|
||||
query: function (param, src, default_value, tval = "1", fval = "0") {
|
||||
var ret = "&" + param + "=";
|
||||
query: function (param, src, default_value) {
|
||||
var obj = this.get(src);
|
||||
if (obj) {
|
||||
var ret = "&" + param + "=";
|
||||
if (obj.type === "checkbox") {
|
||||
return ret + (obj.checked === true ? tval : fval);
|
||||
return ret + (obj.checked === true ? "1" : "0");
|
||||
} else {
|
||||
var result = encodeURIComponent(obj.value);
|
||||
if ((result == null || result.trim() == "") && default_value)
|
||||
result = default_value;
|
||||
if (result == null || result.trim() == "") {
|
||||
if (default_value) {
|
||||
return ret + default_value;
|
||||
}
|
||||
return "";
|
||||
} else {
|
||||
return ret + result;
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
opt.base = "cbid." + urlname + "." + sid;
|
||||
|
@ -594,8 +594,10 @@ local function processData(szType, content, add_mode, add_from)
|
||||
local params = {}
|
||||
for _, v in pairs(split(query[2], '&')) do
|
||||
local t = split(v, '=')
|
||||
if #t > 1 then
|
||||
params[string.lower(t[1])] = UrlDecode(t[2])
|
||||
end
|
||||
end
|
||||
-- [2001:4860:4860::8888]:443
|
||||
-- 8.8.8.8:443
|
||||
if host_port:find(":") then
|
||||
@ -838,8 +840,10 @@ local function processData(szType, content, add_mode, add_from)
|
||||
local params = {}
|
||||
for _, v in pairs(split(query[2], '&')) do
|
||||
local t = split(v, '=')
|
||||
if #t > 1 then
|
||||
params[string.lower(t[1])] = UrlDecode(t[2])
|
||||
end
|
||||
end
|
||||
-- [2001:4860:4860::8888]:443
|
||||
-- 8.8.8.8:443
|
||||
if host_port:find(":") then
|
||||
@ -1186,7 +1190,8 @@ local function parse_link(raw, add_mode, add_from)
|
||||
tinsert(node_list, result)
|
||||
end
|
||||
end
|
||||
end, function ()
|
||||
end, function (err)
|
||||
--log(err)
|
||||
log(v, "解析错误,跳过此节点。")
|
||||
end
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user