Module:Protection banner: Difference between revisions

m
1 revision
m (1 revision)
 
m (1 revision)
(One intermediate revision by the same user not shown)
Line 126: Line 126:


-- Set level
-- Set level
obj.level = effectiveProtectionLevel(obj.action, obj.title)
obj.level = args.demolevel or effectiveProtectionLevel(obj.action, obj.title)
if obj.level == 'accountcreator' then
if obj.level == 'accountcreator' then
-- Lump titleblacklisted pages in with template-protected pages,
-- Lump titleblacklisted pages in with template-protected pages,
Line 871: Line 871:
-- If a page's edit protection is equally or more restrictive than its protection from some other action,
-- If a page's edit protection is equally or more restrictive than its protection from some other action,
-- then don't bother displaying anything for the other action (except categories).
-- then don't bother displaying anything for the other action (except categories).
if protectionObj.action == 'edit' or not walkHierarchy(cfg.hierarchy, protectionObj.level)[effectiveProtectionLevel('edit', protectionObj.title)] then
if protectionObj.action == 'edit' or args.demolevel or not walkHierarchy(cfg.hierarchy, protectionObj.level)[effectiveProtectionLevel('edit', protectionObj.title)] then
-- Initialise the blurb object
-- Initialise the blurb object
local blurbObj = Blurb.new(protectionObj, args, cfg)
local blurbObj = Blurb.new(protectionObj, args, cfg)
14,061

edits