Module:Protection banner: Difference between revisions

add support for the "demolevel" parameter; code by myself and User:Jackmcbarn
(use actual Lua errors, and a small fix to parameter handling)
(add support for the "demolevel" parameter; code by myself and User:Jackmcbarn)
Line 126:
 
-- Set level
obj.level = args.demolevel or effectiveProtectionLevel(obj.action, obj.title)
if obj.level == 'accountcreator' then
-- Lump titleblacklisted pages in with template-protected pages,
Line 871:
-- 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).
if protectionObj.action == 'edit' or args.demolevel or not walkHierarchy(cfg.hierarchy, protectionObj.level)[effectiveProtectionLevel('edit', protectionObj.title)] then
-- Initialise the blurb object
local blurbObj = Blurb.new(protectionObj, args, cfg)