X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=modules%2Fadmin-mini%2Fluasrc%2Fcontroller%2Fmini%2Fsystem.lua;h=6d16ef8650e22c91e7ea1616f20384f8ccb5d4dd;hb=2bbc4eb3c33c3590433174c599ec9418bdb8f38a;hp=be6cdb6b5e564fcb06da2cba6c659c65f1fef7ae;hpb=746fa9df8f3d3443d82cd26d6717e7b5cf3dc8c1;p=project%2Fluci.git diff --git a/modules/admin-mini/luasrc/controller/mini/system.lua b/modules/admin-mini/luasrc/controller/mini/system.lua index be6cdb6b5..6d16ef865 100644 --- a/modules/admin-mini/luasrc/controller/mini/system.lua +++ b/modules/admin-mini/luasrc/controller/mini/system.lua @@ -105,7 +105,9 @@ function action_upgrade() local keepcfg = keep_avail and luci.http.formvalue("keepcfg") if plat and fname then - ret = luci.sys.flash(tmpfile, keepcfg and _keep_pattern()) + ret = function() + return luci.sys.flash(tmpfile, keepcfg and _keep_pattern()) + end end luci.template.render("mini/upgrade", {sysupgrade=plat, ret=ret, keep_avail=keep_avail}) @@ -113,7 +115,7 @@ end function _keep_pattern() local kpattern = "" - local files = luci.model.uci.get_all("luci", "flash_keep") + local files = luci.model.uci.cursor():get_all("luci", "flash_keep") if files then kpattern = "" for k,v in pairs(files) do @@ -121,4 +123,4 @@ function _keep_pattern() end end return kpattern -end \ No newline at end of file +end