From 7908b2b71cd42c4bc6a76f0baabb4cde6d09f553 Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Tue, 1 Jan 2019 04:58:48 +0000 Subject: [PATCH] treewide: fix query arguments to admin/system/opkg Right now the handler only recognizes "query=xx" argument, others will be ignored. Signed-off-by: Yousong Zhou --- .../luasrc/model/cbi/shadowsocks-libev/rules.lua | 2 +- .../luasrc/model/shadowsocks-libev.lua | 2 +- .../htdocs/luci-static/resources/view/network/network.js | 2 +- .../luci-mod-network/luasrc/model/cbi/admin_network/ifaces.lua | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua b/applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua index 5bfd3ddcf..553b297ac 100644 --- a/applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua +++ b/applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua @@ -99,7 +99,7 @@ else o.write = function() return luci.http.redirect( luci.dispatcher.build_url("admin/system/opkg") .. - "?submit=1&install=iptables-mod-conntrack-extra" + "?query=iptables-mod-conntrack-extra" ) end end diff --git a/applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua b/applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua index 54d9618db..cbe32afde 100644 --- a/applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua +++ b/applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua @@ -200,7 +200,7 @@ function option_install_package(s, tab) function p_install.write() return luci.http.redirect( luci.dispatcher.build_url("admin/system/opkg") .. - "?submit=1&install=%s" % opkg_package + "?query=%s" % opkg_package ) end end diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/network.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/network.js index 777a87434..145f5807a 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/network.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/network.js @@ -113,7 +113,7 @@ L.poll(5, L.url('admin/network/iface_status', networks.join(',')), null, var e = document.getElementById(ifc.id + '-ifc-edit'); if (e) e.disabled = true; - var link = L.url('admin/system/opkg') + '?query=luci-proto&display=available'; + var link = L.url('admin/system/opkg') + '?query=luci-proto'; L.dom.content(d, [ E('em', _('Unsupported protocol type.')), E('br'), E('a', { href: link }, _('Install protocol extensions...')) diff --git a/modules/luci-mod-network/luasrc/model/cbi/admin_network/ifaces.lua b/modules/luci-mod-network/luasrc/model/cbi/admin_network/ifaces.lua index 05689d389..5b230795c 100644 --- a/modules/luci-mod-network/luasrc/model/cbi/admin_network/ifaces.lua +++ b/modules/luci-mod-network/luasrc/model/cbi/admin_network/ifaces.lua @@ -227,7 +227,7 @@ if not net:is_installed() then function p_install.write() return luci.http.redirect( luci.dispatcher.build_url("admin/system/opkg") .. - "?submit=1&install=%s" % net:opkg_package() + "?query=%s" % net:opkg_package() ) end end -- 2.25.1