diff options
Diffstat (limited to 'themes')
-rw-r--r-- | themes/fledermaus/luasrc/view/themes/fledermaus/header.htm | 12 | ||||
-rw-r--r-- | themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm | 12 |
2 files changed, 8 insertions, 16 deletions
diff --git a/themes/fledermaus/luasrc/view/themes/fledermaus/header.htm b/themes/fledermaus/luasrc/view/themes/fledermaus/header.htm index 32d844f01..1b7c87532 100644 --- a/themes/fledermaus/luasrc/view/themes/fledermaus/header.htm +++ b/themes/fledermaus/luasrc/view/themes/fledermaus/header.htm @@ -119,20 +119,16 @@ end </div> <% if "admin" == request[1] then - require("luci.model.uci") local ucic = 0 - local changes = luci.model.uci.changes() - if type(changes) == "table" then -- XXX: sometimes string or nil / needs investigation - for n, s in pairs(changes) do - for no, o in pairs(s) do - ucic = ucic + 1; - end + for n, s in pairs(require("luci.model.uci").changes()) do + for no, o in pairs(s) do + ucic = ucic + 1; end end %> <div><%:config Konfiguration%> <ul> - <% if ucic then %> + <% if ucic > 0 then %> <li><a href="<%=controller%>/admin/uci/changes"><%:changes Ă„nderungen%>: <%=ucic%></a></li> <li><a href="<%=controller%>/admin/uci/apply"><%:apply Anwenden%></a></li> <li><a href="<%=controller%>/admin/uci/revert"><%:revert Verwerfen%></a></li> diff --git a/themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm b/themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm index f18d0bce3..5c354d5b4 100644 --- a/themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm +++ b/themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm @@ -119,20 +119,16 @@ end </div> <% if "admin" == request[1] then - require("luci.model.uci") local ucic = 0 - local changes = luci.model.uci.changes() - if type(changes) == "table" then -- XXX: sometimes string or nil / needs investigation - for n, s in pairs(changes) do - for no, o in pairs(s) do - ucic = ucic + 1; - end + for n, s in pairs(require("luci.model.uci").changes()) do + for no, o in pairs(s) do + ucic = ucic + 1; end end %> <div><%:config Konfiguration%> <ul> - <% if ucic then %> + <% if ucic > 0 then %> <li><a href="<%=controller%>/admin/uci/changes"><%:changes Ă„nderungen%>: <%=ucic%></a></li> <li><a href="<%=controller%>/admin/uci/apply"><%:apply Anwenden%></a></li> <li><a href="<%=controller%>/admin/uci/revert"><%:revert Verwerfen%></a></li> |