* luci/themes: fix admin header template, crashes badly when luci.model.uci.changes() returns nil (shouldn't we move this code snipped into a helper function or sth. like that?)

This commit is contained in:
Jo-Philipp Wich 2008-06-04 21:01:48 +00:00
parent 346ad261bb
commit 25e71a2acf
2 changed files with 4 additions and 2 deletions

View file

@ -121,7 +121,8 @@ end
if "admin" == request[1] then
require("luci.model.uci")
local ucic = 0
for n, s in pairs(luci.model.uci.changes()) do
local changes = luci.model.uci.changes()
for n, s in pairs(changes) do
for no, o in pairs(s) do
ucic = ucic + 1;
end

View file

@ -121,7 +121,8 @@ end
if "admin" == request[1] then
require("luci.model.uci")
local ucic = 0
for n, s in pairs(luci.model.uci.changes()) do
local changes = luci.model.uci.changes()
for n, s in pairs(changes) do
for no, o in pairs(s) do
ucic = ucic + 1;
end