luci-0.8: merge r4727
This commit is contained in:
parent
b24c8aa25f
commit
5a2c8db890
1 changed files with 11 additions and 2 deletions
|
@ -40,6 +40,7 @@ function action_packages()
|
||||||
local ipkg = require("luci.model.ipkg")
|
local ipkg = require("luci.model.ipkg")
|
||||||
local void = nil
|
local void = nil
|
||||||
local submit = luci.http.formvalue("submit")
|
local submit = luci.http.formvalue("submit")
|
||||||
|
local changes = false
|
||||||
|
|
||||||
|
|
||||||
-- Search query
|
-- Search query
|
||||||
|
@ -57,6 +58,7 @@ function action_packages()
|
||||||
install = {}
|
install = {}
|
||||||
end
|
end
|
||||||
install[url] = 1
|
install[url] = 1
|
||||||
|
changes = true
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Do install
|
-- Do install
|
||||||
|
@ -64,6 +66,7 @@ function action_packages()
|
||||||
for k, v in pairs(install) do
|
for k, v in pairs(install) do
|
||||||
void, install[k] = ipkg.install(k)
|
void, install[k] = ipkg.install(k)
|
||||||
end
|
end
|
||||||
|
changes = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -73,6 +76,7 @@ function action_packages()
|
||||||
for k, v in pairs(remove) do
|
for k, v in pairs(remove) do
|
||||||
void, remove[k] = ipkg.remove(k)
|
void, remove[k] = ipkg.remove(k)
|
||||||
end
|
end
|
||||||
|
changes = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -117,6 +121,11 @@ function action_packages()
|
||||||
|
|
||||||
luci.template.render("admin_system/packages", {pkgs=pkgs, query=query,
|
luci.template.render("admin_system/packages", {pkgs=pkgs, query=query,
|
||||||
install=install, remove=remove, update=update, upgrade=upgrade})
|
install=install, remove=remove, update=update, upgrade=upgrade})
|
||||||
|
|
||||||
|
-- Remove index cache
|
||||||
|
if changes then
|
||||||
|
luci.fs.unlink("/tmp/luci-indexcache")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function action_backup()
|
function action_backup()
|
||||||
|
|
Loading…
Reference in a new issue