Module:Protection banner: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
m (1 revision imported: Reference-related templates) |
(use require('strict') instead of require('Module:No globals')) |
||
Line 3: | Line 3: | ||
-- Initialise necessary modules. |
-- Initialise necessary modules. |
||
require(' |
require('strict') |
||
local makeFileLink = require('Module:File link')._main |
local makeFileLink = require('Module:File link')._main |
||
local effectiveProtectionLevel = require('Module:Effective protection level')._main |
local effectiveProtectionLevel = require('Module:Effective protection level')._main |
||
Line 652: | Line 652: | ||
function Blurb:_makeVandalTemplateParameter() |
function Blurb:_makeVandalTemplateParameter() |
||
return mw.getCurrentFrame():expandTemplate{ |
|||
return require('Module:Vandal-m')._main{ |
|||
title="vandal-m", |
|||
self._args.user or self._protectionObj.title.baseText |
args={self._args.user or self._protectionObj.title.baseText} |
||
} |
} |
||
end |
end |
||
Line 842: | Line 843: | ||
-- protection from some other action, then don't bother displaying anything |
-- protection from some other action, then don't bother displaying anything |
||
-- for the other action (except categories). |
-- for the other action (except categories). |
||
if protectionObj.action == 'edit' or |
if not yesno(args.catonly) and (protectionObj.action == 'edit' or |
||
args.demolevel or |
args.demolevel or |
||
not getReachableNodes( |
not getReachableNodes( |
||
cfg.hierarchy, |
cfg.hierarchy, |
||
protectionObj.level |
protectionObj.level |
||
)[effectiveProtectionLevel('edit', protectionObj.title)] |
)[effectiveProtectionLevel('edit', protectionObj.title)]) |
||
then |
then |
||
-- Initialise the blurb object |
-- Initialise the blurb object |