Content deleted Content added
HouseBlaster (talk | contribs) protection level |
HouseBlaster (talk | contribs) protection |
||
Line 44:
local currentTitleObject = mw.title.getCurrentTitle()
local subjectTitleObject = currentTitleObject.subjectPageTitle
local underRestrictions -- a boolean for whether there are any active restrictions
local protectionLevel▼
local articleOrPage -- the string "article" (if a mainspace page) or "page" (if not)
local protectionLevel -- the edit protection level
local messageBody
Line 54 ⟶ 56:
-- Helpers to add a restriction if it's active and hasn't been added yet
local function addRestriction(restriction,
if yesno(args[restriction]) or
restrictionFlags[restriction] = true
end
Line 81 ⟶ 83:
maybeAddRestriction(restriction)
end
end▼
end▼
alwaysAddRestriction(prot)▼
end
end
-- Add the protection level
--[[
Line 125 ⟶ 122:
restrictions = setToList(restrictionFlags)
--[[
Restrictions are now all set. Here, we add additional helper functions and variables necessary for generating the banner
Line 130 ⟶ 128:
-- Check whether any of the added restrictions are enabled
-- Determines whether we should use the string "article" or "page"
|