Difference between revisions of "Module:IndianPremierLeague/GroupStageTable"

From blackwiki
Jump to navigation Jump to search
blackwiki>Jfd34
blackwiki>SocietyBox
m (update)
Line 2: Line 2:
 
   
 
   
 
_module.create = function(frame)
 
_module.create = function(frame)
    local args = frame.args
+
     return require("Module:CricketLeagueGroupStageSummary").IPL(frame)
    local year = tonumber(args.year) or error("Parameter: 'year' is missing or invalid")
 
   
 
    local j = 1
 
    local teams = mw.loadData("Module:IndianPremierLeague/Teams")
 
    local filteredTeams = {}
 
    for i, v in ipairs(teams) do
 
        -- Filter the teams based on the year
 
        if year >= v.startYear and (not v.endYear or v.endYear >= year) then
 
            filteredTeams[j] = v
 
            j = j + 1
 
        end
 
    end
 
 
 
     return require("Module:CricketLeagueGroupStageSummary").create(args.useParentData and frame:getParent() or frame, year .. " IPL Group Stage Match Summary", filteredTeams, true, nil, args.useWebSlice)
 
 
end
 
end
 
   
 
   
 
return _module
 
return _module

Revision as of 07:55, 18 April 2014

local _module = {}
 
_module.create = function(frame)
    return require("Module:CricketLeagueGroupStageSummary").IPL(frame)
end
 
return _module