From: Steven Barth Date: Fri, 16 Jan 2009 18:18:53 +0000 (+0000) Subject: Fix saving of ipkg configuration file X-Git-Tag: 0.8.4~13 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=8565a58930eae9df93dec2529b32bb2bd8ac18ca;p=project%2Fluci.git Fix saving of ipkg configuration file --- diff --git a/modules/admin-full/luasrc/model/cbi/admin_system/ipkg.lua b/modules/admin-full/luasrc/model/cbi/admin_system/ipkg.lua index f161045a37..a93b4b0ea3 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_system/ipkg.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_system/ipkg.lua @@ -22,14 +22,13 @@ function t.cfgvalue() return luci.fs.readfile(ipkgfile) or "" end +function t.write(self, section, data) + return luci.fs.writefile(ipkgfile, data) +end + f:append(Template("admin_system/ipkg")) function f.handle(self, state, data) - if state == FORM_VALID then - if (luci.fs.readfile(ipkgfile) or "") ~= data.lines then - luci.fs.writefile(ipkgfile, data.lines) - end - end return true end