From: Jo-Philipp Wich Date: Sat, 19 May 2018 21:26:34 +0000 (+0200) Subject: luci-mod-admin-full: do not override iface section in wireless cbi map X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=fdbb417abe9f5cfb950bcaaf03a55ff400226cef;hp=64da34b13c518ce28dca7d5f7ee791507d21ac08 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 --- 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()