Open main menu

Changes

Module:Sidebar

685 bytes removed, 15:55, 24 May 2014
use Module:Arguments
local p = {}
local getArgs
local HtmlBuilder = require('Module:HtmlBuilder')
local navbar = require('Module:Navbar')._navbar
function makeWrapper(func)
return function(frame)
local origArgs if frame == mw.getCurrentFrame() not getArgs then -- WegetArgs = require('re being called via #invoke. If the invoking template passed any args, use -- them. Otherwise, use the args that were passed into the template. origArgs = frameModule:getParent(Arguments').args for k, v in pairs(frame.args) do origArgs = frame.args break end else -- We're being called from another module or from the debug console, so assume -- the args are passed in directly. origArgs = frame end -- ParserFunctions considers the empty string to be false, so to preserve the previous -- behavior of the template, change any empty arguments to nil, so Lua will consider -- them false too. local args = {} for k, v in pairs(origArgs) do if v ~= '' then args[k] = v endgetArgs
end
return func(argsgetArgs(frame))
end
end
Anonymous user