Content deleted Content added
HouseBlaster (talk | contribs) redundant-stuff-be-gone |
HouseBlaster (talk | contribs) protection level |
||
Line 44:
local currentTitleObject = mw.title.getCurrentTitle()
local subjectTitleObject = currentTitleObject.subjectPageTitle
local protectionLevel
local messageBody
--[[
This area sets active restrictions
Line 85 ⟶ 86:
-- Page protection restriction (if it's defined)
-- todo: Figure this one
for _, prot in ipairs(protectionLevels) do
if restrictionsDefinition[prot] then
Line 91:
end
end
-- Add the protection level
maybeAddRestriction(subjectTitleObject.protectionLevels["edit"][1])
--[[
Line 105 ⟶ 108:
end
--
if restrictionFlags["0RR"] then
clearOtherRevertRules("0RR")
Line 114 ⟶ 117:
end
-- if we make it to this point, 1RR-nocat is the only one potentially enabled
-- so we don't
-- clear BRD if consensus-required is enabled
if restrictionFlags["consensus-required"] then restrictionFlags["BRD"] = nil end
-- and finally, convert our set to a list to make it easy to work with
restrictions = setToList(restrictionFlags)
|