libs/web: change "module" variable to "modname" in dispatcher.lua, solves apidoc...
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 12 Dec 2010 20:16:13 +0000 (20:16 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 12 Dec 2010 20:16:13 +0000 (20:16 +0000)
libs/web/luasrc/dispatcher.lua

index 3d0db5a21e0fd0b0f6b06181ed99b59dcdd6fa76..28c460858d65be9d54a90f084bf53bac75656b99 100644 (file)
@@ -457,16 +457,16 @@ function createindex_plain(path, suffixes)
        index = {}
 
        for i,c in ipairs(controllers) do
-               local module = "luci.controller." .. c:sub(#path+1, #c):gsub("/", ".")
+               local modname = "luci.controller." .. c:sub(#path+1, #c):gsub("/", ".")
                for _, suffix in ipairs(suffixes) do
-                       module = module:gsub(suffix.."$", "")
+                       modname = modname:gsub(suffix.."$", "")
                end
 
-               local mod = require(module)
+               local mod = require(modname)
                local idx = mod.index
 
                if type(idx) == "function" then
-                       index[module] = idx
+                       index[modname] = idx
                end
        end