Module:Progression rainbow: Difference between revisions

Content deleted Content added
poke
use the api that I'm supposed to
Line 29:
 
local function category_count(category, project, frame)
return tonumber(frame:callParserFunctionmw.site.stats.pagesInCategory(
'PAGESINCATEGORY',
category .. project .. 'articles',
'R'pages
))
end
 
Line 45 ⟶ 44:
function p._main(args, frame)
-- is there a way that I can avoid passing a reference to the parent frame?
-- I need to be able to access extensionTag and callParserFunction in p._main
-- these are defined on frame
Line 75 ⟶ 74:
for i, class in pairs(classes) do
if project then
class['count'] = category_count(class['category'], project, frame)
if class['class'] == 'FA' then
class['count'] = class['count'] + category_count(
project_classes[1]['category'],
project,
frame
)
end
Line 93 ⟶ 91:
divisor = sum_classes + category_count(
project_classes[2]['category'],
project,
frame
)
else