Open main menu

Changes

Module:Protection banner

60 bytes added, 11:59, 16 July 2021
add catonly param which hides both the banner and padlock if set to yes. all testcases pass. tested in sandbox.
function Blurb:_makeVandalTemplateParameter()
return requiremw.getCurrentFrame('Module):VandalexpandTemplate{ title="vandal-m')._main{", args={self._args.user or self._protectionObj.title.baseText}
}
end
-- protection from some other action, then don't bother displaying anything
-- for the other action (except categories).
if not yesno(args.catonly) and (protectionObj.action == 'edit' or
args.demolevel or
not getReachableNodes(
cfg.hierarchy,
protectionObj.level
)[effectiveProtectionLevel('edit', protectionObj.title)])
then
-- Initialise the blurb object