Module:Protection banner: Difference between revisions

just pass the args through to the /config functions - that means the /config functions can use arbitrary parameters without them having to be specified in the main module
Enwikipedia>Mr. Stradivarius
(don't use the wrapper option with Module:Arguments, as it prevents us from passing through parameters from the parent frame)
Enwikipedia>Mr. Stradivarius
(just pass the args through to the /config functions - that means the /config functions can use arbitrary parameters without them having to be specified in the main module)
Line 344:
self._cfg = cfg
self._protectionObj = protectionObj
self._data_args = {args
username = args.user,
section = args.section
}
end
 
Line 592 ⟶ 589:
mw.site.namespaces[self._protectionObj.title.namespace].talk.name,
self._protectionObj.title.text,
self._data_args.section or 'top',
self:_getExpandedMessage('talk-page-link-display')
)
Line 607 ⟶ 604:
function Blurb:_makeVandalTemplateParameter()
return require('Module:Vandal-m')._main{
self._data_args.usernameuser or self._protectionObj.title.baseText
}
end
Line 627 ⟶ 624:
return self:_substituteParameters(msg)
elseif type(msg) == 'function' then
msg = msg(self._protectionObj, self._data_args)
if type(msg) ~= 'string' then
error(string.format(