Jump to content

Module:Csdcheck

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Mr. Stradivarius (talk | contribs) at 15:01, 21 March 2013 (try getting parent args). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

local p = {}
 
function p.check(frame)
    local args = frame.args;

    if args[1] == nil then
        local parent = frame:getParent();
        args = parent.args;
    end

    local result = nil
    for i,v in ipairs(args) do
        local crit = {"G1","G2","G3","G4"}
        for x,y in ipairs(crit) do
            if v == y then
                result = "yes";
            end
        end
    end
    return result
end
 
return p