Jump to content

Module:Protection banner/config: Difference between revisions

fix parameter names for the banner data functions
(add dmca reason)
(fix parameter names for the banner data functions)
Line 114: Line 114:
description = 'For pages protected by the Wikimedia Foundation'
description = 'For pages protected by the Wikimedia Foundation'
.. ' due to Digital Millennium Copyright Act takedown requests.',
.. ' due to Digital Millennium Copyright Act takedown requests.',
explanation = function (protectionDate, blurbData)
explanation = function (protectionObj, args)
local ret = 'Pursuant to a rights owner notice under the Digital'
local ret = 'Pursuant to a rights owner notice under the Digital'
.. ' Millennium Copyright Act (DMCA) regarding some content'
.. ' Millennium Copyright Act (DMCA) regarding some content'
Line 120: Line 120:
.. ' applicable law and took down and restricted the content'
.. ' applicable law and took down and restricted the content'
.. ' in question.'
.. ' in question.'
if blurbData.notice then
if args.notice then
ret = ret .. ' A copy of the received notice can be found here: '
ret = ret .. ' A copy of the received notice can be found here: '
.. blurbData.notice .. '.'
.. args.notice .. '.'
end
end
ret = ret .. ' For more information, including websites discussing'
ret = ret .. ' For more information, including websites discussing'
Line 135: Line 135:
dispute = {
dispute = {
description = 'For pages protected due to editing disputes.',
description = 'For pages protected due to editing disputes.',
text = function (protectionObj, blurbData)
text = function (protectionObj, args)
-- Find the value of "disputes".
-- Find the value of "disputes".
local display = 'disputes'
local display = 'disputes'
local disputes
local disputes
if blurbData.section then
if args.section then
disputes = string.format(
disputes = string.format(
'[[%s:%s#%s|%s]]',
'[[%s:%s#%s|%s]]',
mw.site.namespaces[protectionObj.title.namespace].talk.name,
mw.site.namespaces[protectionObj.title.namespace].talk.name,
protectionObj.title.text,
protectionObj.title.text,
blurbData.section,
args.section,
display
display
)
)
Line 179: Line 179:
office = {
office = {
description = 'For pages protected by the Wikimedia Foundation.',
description = 'For pages protected by the Wikimedia Foundation.',
text = function (protectionDate, blurbData)
text = function (protectionObj, args)
local ret = 'This ${PAGETYPE} is currently under the'
local ret = 'This ${PAGETYPE} is currently under the'
.. ' scrutiny of the'
.. ' scrutiny of the'
Line 198: Line 198:
description = 'For pages protected by the Wikimedia Foundation and'
description = 'For pages protected by the Wikimedia Foundation and'
.. ' "reset" to a bare-bones version.',
.. ' "reset" to a bare-bones version.',
text = function (protectionObj, blurbData)
text = function (protectionObj, args)
local ret = ''
local ret = ''
if protectionObj.protectionDate then
if protectionObj.protectionDate then
Line 277: Line 277:
.. ' [[Wikipedia:Vandalism|vandalism]].',
.. ' [[Wikipedia:Vandalism|vandalism]].',
text = '${INTROBLURB} due to [[Wikipedia:Vandalism|vandalism]].',
text = '${INTROBLURB} due to [[Wikipedia:Vandalism|vandalism]].',
explanation = function (protectionObj, blurbData)
explanation = function (protectionObj, args)
local ret = ''
local ret = ''
if protectionObj.level == 'sysop' then
if protectionObj.level == 'sysop' then
Cookies help us deliver our services. By using our services, you agree to our use of cookies.