* luci/themes: fix query string functionality
[project/luci.git] / themes / fledermaus / luasrc / view / themes / fledermaus / header.htm
index 327e339..9f27f98 100644 (file)
@@ -1,11 +1,11 @@
 <%
 require("luci.sys")
 local load1, load5, load15 = luci.sys.loadavg()
-local request  = require("luci.dispatcher").request
+local request  = require("luci.dispatcher").context.path
 local category = request[1]
 local tree     = luci.dispatcher.node()
 local cattree  = category and luci.dispatcher.node(category)
-local node     = luci.dispatcher.dispatched 
+local node     = luci.dispatcher.context.dispatched 
 
 local c = tree
 for i,r in ipairs(request) do
@@ -75,7 +75,7 @@ local function submenu(prefix, node)
        <% for j, v in pairs(index) do 
                local nnode = node.nodes[v.name]
                local href = controller .. prefix .. v.name
-               href = (v.query) and href .. luci.http.build_querystring(v.query) or href
+               href = (nnode.query) and href .. luci.http.build_querystring(nnode.query) or href
                %>
                <li>
                        <span<% if nnode._menu_selected then %> class="yellowtext"<%end%>><a href="<%=href%>"><%=nnode.title%></a></span>