Content deleted Content added
HouseBlaster (talk | contribs) simplify |
HouseBlaster (talk | contribs) fix bug |
||
Line 44:
local messageBody
--
local function addRestriction(restriction, topicWide)
if (yesno(args[restriction]) or topicWide) and not restrictionFlags[restriction] then
restrictionFlags[restriction] = true
table.insert(restrictions, restriction)
end
end
local function maybeAddRestriction(restriction) return addRestriction(restriction, false) end
local function alwaysAddRestriction(restriction) return addRestriction(restriction, true) end
--
-- Topic-based restrictions
Line 65 ⟶ 68:
if topicWide then
for _, restriction in ipairs(topicWide) do
end
end
Line 72 ⟶ 75:
if additional then
for _, restriction in ipairs(additional) do
end
end
Line 85 ⟶ 88:
end
-- Check whether any of the added restrictions are actually defined, and are real restrictions
local underRestrictions =
for _, r in ipairs(restrictions) do
if restrictionsDefinition[r] then
underRestrictions = true
break
end
end
local articleOrPage = currentTitleObject:inNamespaces(1) and "article" or "page"
|