Modul:Effective protection level: Unterschied zwischen den Versionen
(avoid calling the parser unnecessarily) |
(test content models rather than page names, to match MediaWiki) |
||
Zeile 27: | Zeile 27: | ||
if title.namespace == 8 then -- MediaWiki namespace | if title.namespace == 8 then -- MediaWiki namespace | ||
return 'sysop' | return 'sysop' | ||
elseif title.namespace == 2 and ( | elseif title.namespace == 2 and ( title.contentModel == 'javascript' or title.contentModel == 'css' ) then -- user JS or CSS page | ||
return 'sysop' | return 'sysop' | ||
end | end |