Module:Sprite: Difference between revisions

Only remove categories from translation pages, instead of all subpages
Undo revision 908902 by Majr (talk) well we're on 1.26, so this should work now
Line 211: Line 211:
addProtection( protection )
addProtection( protection )
end
end
if title.cascadingProtection then
local cascading = title.cascadingProtection.restrictions[action] or {}
local cascading = title.cascadingProtection.restrictions[action] or {}
if #cascading > 0 then
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
for _, protection in ipairs( cascading ) do
addProtection( protection )
end
end