summaryrefslogtreecommitdiffhomepage
path: root/themes
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2008-07-16 02:59:12 +0000
committerJo-Philipp Wich <jow@openwrt.org>2008-07-16 02:59:12 +0000
commit6a0a1a5496bd83fee14945081b4b4170220afd5e (patch)
tree35c487336abc3ae32b46bb3142ce187d7b757d9e /themes
parent79a35fe82515580995416eb44f33c0dbc36d8220 (diff)
* luci/themes/openwrt.org: workaround for empty menu points (seen in statistics)
Diffstat (limited to 'themes')
-rw-r--r--themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm8
1 files changed, 5 insertions, 3 deletions
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 5aed18f36..c7908c0c5 100644
--- a/themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm
+++ b/themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm
@@ -111,14 +111,16 @@ local function submenu(prefix, node)
%>
<ul>
<% for j, v in pairs(index) do
- local nnode = node.nodes[v.name]
- local href = controller .. prefix .. v.name
- href = (nnode.query) and href .. luci.http.build_querystring(nnode.query) or href
+ if #v.name > 0 then
+ local nnode = node.nodes[v.name]
+ local href = controller .. prefix .. v.name
+ href = (nnode.query) and href .. luci.http.build_querystring(nnode.query) or href
%>
<li>
<span<% if nnode._menu_selected then %> class="active"<%end%>><a href="<%=href%>"><%=nnode.title%></a></span>
<% submenu(prefix .. v.name .. "/", nnode) %>
</li>
+ <% end %>
<% end %>
</ul>
<%