Difference between revisions of "Module:High-use"
Jump to navigation
Jump to search
remove unneeded return variables (if this breaks anything feel free to revert without discussing with me first)
m (1 revision imported: Content from Template:Reflist on Wikipedia) |
(remove unneeded return variables (if this breaks anything feel free to revert without discussing with me first)) |
||
Line 18: | Line 18: | ||
if count == nil then | if count == nil then | ||
if frame.args[1] == "risk" then | if frame.args[1] == "risk" then | ||
return "a very large number of" | |||
else | else | ||
return "many" | |||
end | end | ||
else | else | ||
Line 52: | Line 52: | ||
return return_value | return return_value | ||
end | end | ||
-- Actions if there is a large (greater than or equal to 100,000) transclusion count | -- Actions if there is a large (greater than or equal to 100,000) transclusion count | ||
function p.risk(frame) | function p.risk(frame) | ||
if frame.args[1] == "risk" then | if frame.args[1] == "risk" then | ||
return "risk" | |||
else | else | ||
local count = _fetch(frame) | local count = _fetch(frame) | ||
if count and count >= 100000 then | if count and count >= 100000 then | ||
return "risk" | |||
end | |||
end | end | ||
return | return "" | ||
end | end | ||
Line 93: | Line 95: | ||
if systemMessages then | if systemMessages then | ||
used_on_text = used_on_text .. systemMessages .. | used_on_text = used_on_text .. systemMessages .. | ||
((count and count > 2000) and (" | ((count and count > 2000) and ("''', and " .. templateCount) or ("'''")) | ||
else | else | ||
used_on_text = used_on_text .. templateCount .. "'''" | used_on_text = used_on_text .. templateCount .. "'''" |