Content deleted Content added
HouseBlaster (talk | contribs) m Protected "Module:Contentious topics talk banner": Highly visible template ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) |
HouseBlaster (talk | contribs) sync with sandbox, which works with a |protection parameter |
||
Line 69:
local function alwaysAddRestriction(restriction)
restrictionFlags[restriction] = true
end▼
local function addCategory(cat)▼
if cat then▼
categories = categories .. '[[Category:' .. cat .. '|' .. currentTitleObject.text .. ']]'▼
end▼
end
Line 94 ⟶ 101:
-- Add the protection level
if yesno(args.protection, true) then
if protectionLevel then
-- handle ECR with protection correctly
if protectionLevel == "full" then alwaysAddRestriction("full") end
else
alwaysAddRestriction(protectionLevel)▼
-- no ECR, so just add the protection as normal
▲ alwaysAddRestriction(protectionLevel)
end
manualRestrictions = true
else
-- we have a |protection=foo parameter, but the page is *not* protected
addCategory(categoryDatabase['protection-error'])
end
end
Line 132 ⟶ 146:
-- Determines whether we should use the string "article" or "page"
local articleOrPage = currentTitleObject:inNamespaces(1) and "article" or "page"
▲ -- helper to add a category
▲ local function addCategory(cat)
▲ if cat then
▲ categories = categories .. '[[Category:' .. cat .. '|' .. currentTitleObject.text .. ']]'
▲ end
▲ end
-- Makes a bullet point for a given contentious topic
|