Difference between revisions of "Module:Message box"

3 bytes added ,  07:56, 28 September 2013
fix bug where the arguments where all getting removed if cfg.allowBlankParams wasn't present
>Mr. Stradivarius
(on second thoughts, I like this way of passing params to category handler better)
>Mr. Stradivarius
(fix bug where the arguments where all getting removed if cfg.allowBlankParams wasn't present)
Line 156: Line 156:
     local newArgs = {}
     local newArgs = {}
     for k, v in pairs(args) do
     for k, v in pairs(args) do
         for i, param in ipairs(cfg.allowBlankParams or {}) do
         if v ~= '' then
            if v ~= '' or k == param then
            newArgs[k] = v
                newArgs[k] = v
            end
         end
         end
    end
    for i, param in ipairs(cfg.allowBlankParams or {}) do
        newArgs[param] = args[param]
     end
     end
     return newArgs
     return newArgs
Anonymous user