Module:Protection banner/sandbox: Difference between revisions

Content deleted Content added
Jackmcbarn (talk | contribs)
still respect args.category
Jackmcbarn (talk | contribs)
handle parent not existing, and other errors
Line 890:
end
if protectionObj.action ~= 'edit' and walkHierarchy(protectionObj.level, cfg.hierarchy)[effectiveProtectionLevel('edit', objprotectionObj.title)] then
-- 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 error categories, if any).
Line 921:
 
-- Find default args, if any.
local parentTitleparent = frame:.getParent() and frame:getTitlegetParent()
parentTitlelocal defaultArgs = parentTitleparent and cfg.wrappers[parent:getTitle():gsub('/sandbox$', '')] or {}
local defaultArgs = cfg.wrappers[parentTitle] or {}
 
-- Find user args, and use the parent frame if we are being called from a