-
-
- -- Package info
- local info = luci.model.ipkg.info(query and "*"..query.."*")
- info = info or {}
- local pkgs = {}
-
- -- Sort after status and name
- for k, v in pairs(info) do
- local x = 0
- for i, j in pairs(pkgs) do
- local vins = (v.Status and v.Status.installed)
- local jins = (j.Status and j.Status.installed)
- if vins ~= jins then
- if vins then
- break
- end
- else
- if j.Package > v.Package then
- break
- end
- end
- x = i
- end
- table.insert(pkgs, x+1, v)
- end
-
- luci.template.render("admin_system/packages", {pkgs=pkgs, query=query,
- install=install, remove=remove, update=update, upgrade=upgrade})
-
+
+
+ luci.template.render("admin_system/packages", {
+ query=query, install=install, remove=remove, update=update, upgrade=upgrade
+ })
+