Module:High-use: Difference between revisions

m
1 revision imported
m (Protected "Module:High-use": High-risk template or module (more info) ([Edit=Require autoconfirmed or confirmed access] (indefinite)))
 
m (1 revision imported)
 
(2 intermediate revisions by 2 users not shown)
Line 15:
end
else
-- Use 2 sigfigssignificant figures for smaller numbers and 3 for larger ones
local sigfig = 2
if count >= 100000 then
Line 36:
if frame.args["all-pages"] and frame.args["all-pages"] ~= "" then
local percent = math.floor( ( (count/frame:callParserFunction('NUMBEROFPAGES', 'R') ) * 100) + 0.5)
return_value = string.format("%s pages, whichor isroughly %s%% of all", return_value, percent)
end
end
Line 42:
return return_value
end
-- Actions if there is a large (greater than or equal to 100,000) transclusion count
 
function p.risk(frame)
local return_value = ""
Line 82:
info = "<br />" .. frame.args["info"]
end
sandbox_text = string.format(".%s<br /> To avoid large-scalemajor disruption and unnecessary server load, any changes to it should first be tested in the %sThe tested changes can then be added to this page in a single edit.&#x20;",
info, sandbox_text
)
else
sandbox_text = string.format(", soand changes to it willmay be widely noticed. Please test anyTest changes in the %s",
sandbox_text
)
end
local discussion_text = "Please considerConsider discussing changes "
if frame.args["2"] and frame.args["2"] ~= "" and frame.args["2"] ~= "yes" then
discussion_text = string.format("%sat [[%s]]", discussion_text, frame.args["2"])