Difference between revisions of "Module:Effective protection level"

Jump to navigation Jump to search
No FlaggedRevs on this wiki
>BDavis (WMF)
m (1 revision imported from w:en:Module:Effective_protection_level)
>Pppery
(No FlaggedRevs on this wiki)
Line 13: Line 13:
end
end
pagename = title.prefixedText
pagename = title.prefixedText
if action == 'autoreview' then
if action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' then
local level = mw.ext.FlaggedRevs.getStabilitySettings(title).autoreview
error( 'First parameter must be one of edit, move, create, upload', 2 )
if level == 'review' then
return 'reviewer'
elseif level ~= '' then
return level
else
return nil -- not '*'. a page not being PC-protected is distinct from it being PC-protected with anyone able to review. also not '', as that would mean PC-protected but nobody can review
end
elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' then
error( 'First parameter must be one of edit, move, create, upload, autoreview', 2 )
end
end
if title.namespace == 8 then -- MediaWiki namespace
if title.namespace == 8 then -- MediaWiki namespace
Anonymous user

Navigation menu