* luci/themes/openwrt.org: workaround for empty menu points (seen in statistics)
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 16 Jul 2008 02:59:12 +0000 (02:59 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 16 Jul 2008 02:59:12 +0000 (02:59 +0000)
themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm

index 5aed18f3673a222a1e5ae2c62dddf93a3bd22272..c7908c0c5a2e7eb1dc4ff963b4920590ba8c7860 100644 (file)
@@ -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>
 <%