Module:Contentious topics/talk notice: Difference between revisions

Content deleted Content added
redundant-stuff-be-gone
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
local protectionLevels = subjectTitleObject.protectionLevels and subjectTitleObject.protectionLevels["edit"] or {}
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
--make surethen you handleuse the casemost with allapplicable revert rules active correctly!rule
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 makeneed ato seperatedisable checkthe for itrest
 
-- 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)