Jump to content

Module:Protection banner: Difference between revisions

rm stuff only useful for pp-create and other things deprecated in favor of salting
(no need to special case indef expiry. if it's indef, the messages that get used don't use it anyway)
(rm stuff only useful for pp-create and other things deprecated in favor of salting)
Line 60: Line 60:


Protection.supportedActions = {
Protection.supportedActions = {
create = true,
edit = true,
edit = true,
move = true,
move = true,
Line 321: Line 320:
self._cfg = cfg
self._cfg = cfg
self._protectionObj = protectionObj
self._protectionObj = protectionObj
self._deletionDiscussionPage = args.xfd
self._username = args.user
self._username = args.user
self._section = args.section
self._section = args.section
Line 353: Line 351:


parameterFuncs.CURRENTVERSION    = self._makeCurrentVersionParameter
parameterFuncs.CURRENTVERSION    = self._makeCurrentVersionParameter
parameterFuncs.DELETIONDISCUSSION = self._makeDeletionDiscussionParameter
parameterFuncs.DISPUTEBLURB      = self._makeDisputeBlurbParameter
parameterFuncs.DISPUTEBLURB      = self._makeDisputeBlurbParameter
parameterFuncs.DISPUTESECTION    = self._makeDisputeSectionParameter
parameterFuncs.DISPUTESECTION    = self._makeDisputeSectionParameter
Line 407: Line 404:
self:_getExpandedMessage('current-version-edit-display')
self:_getExpandedMessage('current-version-edit-display')
)
)
end
end
function Blurb:_makeDeletionDiscussionLinkParameter()
if self._deletionDiscussionPage then
local display = self:_getExpandedMessage('deletion-discussion-link-display')
return string.format('[[%s|%s]]', self._deletionDiscussionPage, display)
end
end
end
end
Line 496: Line 486:
else
else
key = 'explanation-blurb-move-subject'
key = 'explanation-blurb-move-subject'
end
elseif action == 'create' then
if self._deletionDiscussion then
key = 'explanation-blurb-create-xfd'
else
key = 'explanation-blurb-create-noxfd'
end
end
else
else
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.