Content deleted Content added
HouseBlaster (talk | contribs) update |
HouseBlaster (talk | contribs) various code improvements |
||
Line 48:
local articleOrPage -- the string "article" (if a mainspace page) or "page" (if not)
local protectionLevel -- the edit protection level
local messageBody -- the text within the message box
local messageBox -- the message box itself
local categories = '' -- initialize categories
local manualRestrictions = false -- have we set any restrictions via |parameters?
--[[
Line 66 ⟶ 67:
-- Helpers to add a restriction if it's active and hasn't been added yet
manualRestrictions = true
end▼
local function alwaysAddRestriction(restriction)
end
-- Add the always-available restrictions
Line 109 ⟶ 113:
--[[
Clear duplicate restrictions (e.g. 0RR and 1RR
--]]
-- if 0RR, then clear 1RR
if restrictionFlags["0RR"] then▼
restrictionFlags["1RR"] = nil
▲ restrictionFlags[rr] = true
end
▲ if restrictionFlags["0RR"] then
▲ end
-- 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
Line 221 ⟶ 212:
if args['placed-date'] then
messageBody = messageBody .. '<p>Restrictions placed: ' .. require('Module:Date')._Date(args['placed-date']):text() .. '</p>'
elseif manualRestrictions then
addCategory(categoryDatabase['no-date'])
end
|