Skip to content

Commit 49bf4e4

Browse files
committed
roll back to using template expansion
1 parent 3bcf365 commit 49bf4e4

1 file changed

Lines changed: 13 additions & 26 deletions

File tree

‎lua/wikis/commons/NotabilityChecker.lua‎

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ local Info = Lua.import('Module:Info', {loadData = true})
1414
local Logic = Lua.import('Module:Logic')
1515
local MathUtil = Lua.import('Module:MathUtil')
1616
local Opponent = Lua.import('Module:Opponent/Custom')
17-
local ResultsTable = Lua.import('Module:ResultsTable/Custom')
1817
local String = Lua.import('Module:StringUtils')
1918
local Table = Lua.import('Module:Table')
19+
local Template = Lua.import('Module:Template')
2020
local Tier = Lua.import('Module:Tier/Custom')
2121

2222
local GeneralCollapsible = Lua.import('Module:Widget/GeneralCollapsible/Default')
@@ -117,13 +117,12 @@ function NotabilityChecker._runForTeam(team)
117117
'Tournaments found featuring ',
118118
team,
119119
},
120-
children = ResultsTable.results{
121-
awards = false,
122-
achievements = false,
123-
playerResultsOfTeam = false,
124-
querytype = Opponent.team,
125-
team = team,
126-
}
120+
-- TODO: Replace with direct ResultsTable call
121+
children = Template.safeExpand(
122+
mw.getCurrentFrame(),
123+
'NotabilityTeamMatchesTable',
124+
{title = team}
125+
)
127126
},
128127
'\n',
129128
Html.B{children = 'Weight:'},
@@ -161,24 +160,12 @@ function NotabilityChecker._calculateRosterNotability(team, people)
161160
'Tournaments found featuring ',
162161
person,
163162
},
164-
children = {
165-
ResultsTable.results{
166-
awards = false,
167-
achievements = false,
168-
playerResultsOfTeam = false,
169-
playerLimit = MAX_NUMBER_OF_PARTICIPANTS,
170-
querytype = Opponent.solo,
171-
player = person,
172-
},
173-
ResultsTable.results{
174-
awards = false,
175-
achievements = false,
176-
playerResultsOfTeam = false,
177-
querytype = 'coach',
178-
coachLimit = Config.MAX_NUMBER_OF_COACHES,
179-
coach = person,
180-
},
181-
},
163+
-- TODO: Replace with direct ResultsTable call
164+
children = Template.safeExpand(
165+
mw.getCurrentFrame(),
166+
'NotabilityPlayerMatchesTable',
167+
{title = person}
168+
)
182169
},
183170
Html.B{children = 'Person:'},
184171
' ',

0 commit comments

Comments
 (0)