Module:Sprite: Difference between revisions
Add protection information to doc data |
Cascading protection was implemented in 1.24... |
||
| Line 209: | Line 209: | ||
addProtection( protection ) | addProtection( protection ) | ||
end | end | ||
local cascading = title.cascadingProtection.restrictions[action] or {} | if title.cascadingProtection then | ||
local cascading = title.cascadingProtection.restrictions[action] or {} | |||
if #cascading > 0 then | |||
table.insert( protections, 'protect' ) | |||
end | |||
for _, protection in ipairs( cascading ) do | |||
addProtection( protection ) | |||
end | |||
elseif f:callParserFunction( 'CASCADINGSOURCES', title.prefixedText ) ~= '' then | |||
-- Just adding the requirement for the protect right should be good enough until MW 1.25 | |||
table.insert( protections, 'protect' ) | table.insert( protections, 'protect' ) | ||
end | end | ||