Jump to content

Module:High-use and Module:High-use/sandbox: Difference between pages

(Difference between pages)
Content deleted Content added
Fix fetch=no and no-percent=yes
 
concision
 
Line 45: Line 45:
no_percent = no_percent or args['no-percent']
no_percent = no_percent or args['no-percent']
if count and count > 250000 and not yesno (no_percent) then
if count and count > 250000 and not yesno (no_percent) then
local numpages = mw.getCurrentFrame():callParserFunction('NUMBEROFPAGES', 'R')
local = mw.getCurrentFrame():callParserFunction('NUMBEROFPAGES', 'R')
local percent = math.floor( ( ( count/numpages ) * 100) + 0.5)
local = math.floor( ( ( count/ ) * 100) + 0.5)

if percent >= 1 then
local num_mainspace_pages = mw.getCurrentFrame():callParserFunction('NUMBEROFARTICLES', 'R')
return_value = string.format("%s pages, or roughly %s%% of all", return_value, percent)
local mainspace_percent = math.floor( ( ( count/num_mainspace_pages ) * 100) + 0.5)

if >= 1 then
return_value = string.format("%s pages, roughly %s%% of all", return_value, )
end
end
end
end
end
end