From fdbb417abe9f5cfb950bcaaf03a55ff400226cef Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 19 May 2018 23:26:34 +0200 Subject: [PATCH] luci-mod-admin-full: do not override iface section in wireless cbi map Do override the iface section id upon commit to avoid clobbering the resulting configuration. The manual config sync is not needed anymore after switching to uncached ubus uci operations. Fixes #1770. Signed-off-by: Jo-Philipp Wich --- .../luasrc/model/cbi/admin_network/wifi.lua | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua index a3e28fe58..cacaa2595 100644 --- a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua +++ b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua @@ -11,7 +11,7 @@ local acct_port, acct_secret, acct_server, anonymous_identity, ant1, ant2, auth, auth_port, auth_secret, auth_server, bssid, cacert, cacert2, cc, ch, cipher, clientcert, clientcert2, ea, eaptype, en, encr, ft_protocol, ft_psk_generate_local, hidden, htmode, identity, - ieee80211r, ieee80211w, ifname, ifsection, isolate, key_retries, + ieee80211r, ieee80211w, ifname, isolate, key_retries, legacyrates, max_timeout, meshfwd, meshid, ml, mobility_domain, mode, mp, nasid, network, password, pmk_r1_push, privkey, privkey2, privkeypwd, privkeypwd2, r0_key_lifetime, r0kh, r1_key_holder, r1kh, @@ -30,14 +30,6 @@ m:chain("network") m:chain("firewall") m.redirect = luci.dispatcher.build_url("admin/network/wireless") -function m.on_commit(map) - local wnet = nw:get_wifinet(arg[1]) - if ifsection and wnet then - ifsection.section = wnet.sid - m.title = luci.util.pcdata(wnet:get_i18n()) - end -end - nw.init(m.uci) local wnet = nw:get_wifinet(arg[1]) @@ -350,7 +342,6 @@ end ----------------------- Interface ----------------------- s = m:section(NamedSection, wnet.sid, "wifi-iface", translate("Interface Configuration")) -ifsection = s s.addremove = false s.anonymous = true s.defaults.device = wdev:name() -- 2.11.0