Changes
Jump to navigation
Jump to search
local action = self._protectionObj.action
local deletionDiscussionPage = if self._deletionDiscussionPage if deletionDiscussionPage then
local expiry = if type(self._protectionObj.expiry if type(expiry) == 'number' then
local section = self._section
sectionself._section,
local expiry = if type(self._protectionObj.expiry if type(expiry) == 'number' then
local protectionDate = if self._protectionObj.protectionDate if protectionDate then
local namespace = return pagetypes[self._protectionObj.title.namespace] return pagetypes[namespace] or pagetypes.default or error('no default pagetype defined')
local action = self._protectionObj.action
local protectionDate = if self._protectionObj.protectionDate if protectionDate then
local section = self._section
local display = self:_getExpandedMessage('talk-page-link-display')
section self._section or 'top', self:_getExpandedMessage('talk-page-link-display')
local expiry = if type(self._protectionObj.expiry if type(expiry) == 'number' then
local mVandalM = return require('Module:Vandal-m')._main{ local username = self._username username = username or self._protectionObj.title.baseText return mVandalM._main{username}
get rid of a few more unnecessary local variables
-- A link to the page history or the move log, depending on the kind of
-- protection.
local pagename = self._protectionObj.title.prefixedText
if self._protectionObj.action == 'move' then
-- We need the move log link.
return self.makeFullUrl(
function Blurb:_makeDeletionDiscussionLinkParameter()
local display = self:_getExpandedMessage('deletion-discussion-link-display')
return string.format('[[%s|%s]]', deletionDiscussionPageself._deletionDiscussionPage, display)
end
end
function Blurb:_makeDisputeBlurbParameter()
return self:_getExpandedMessage('dispute-blurb-expiry')
else
function Blurb:_makeDisputeSectionParameter()
-- "disputes", with or without a section link
local disputes = self:_getExpandedMessage('dispute-section-link-display')
if section self._section then
return string.format(
'[[%s:%s#%s|%s]]',
mw.site.namespaces[self._protectionObj.title.namespace].talk.name,
self._protectionObj.title.text,
disputes
)
function Blurb:_makeIntroBlurbParameter()
return self:_getExpandedMessage('intro-blurb-expiry')
else
function Blurb:_makeOfficeBlurbParameter()
return self:_getExpandedMessage('office-blurb-protectiondate')
else
function Blurb:_makePagetypeParameter()
local pagetypes = self._cfg.pagetypes
end
function Blurb:_makeProtectionLogParameter()
local pagename = self._protectionObj.title.prefixedText
if self._protectionObj.action == 'autoreview' then
-- We need the pending changes log.
return self.makeFullUrl(
function Blurb:_makeResetBlurbParameter()
return self:_getExpandedMessage('reset-blurb-protectiondate')
else
function Blurb:_makeTalkPageParameter()
return string.format(
'[[%s:%s#%s|%s]]',
mw.site.namespaces[self._protectionObj.title.namespace].talk.name,
self._protectionObj.title.text,
)
end
function Blurb:_makeTooltipBlurbParameter()
return self:_getExpandedMessage('tooltip-blurb-expiry')
else
function Blurb:_makeVandalTemplateParameter()
end