Module:Protection banner: Difference between revisions
Jump to navigation
Jump to search
next expiry
>Jackmcbarn (now reason) |
>Jackmcbarn (next expiry) |
||
Line 70: | Line 70: | ||
local indefStrings = configObj.cfg.indefStrings | local indefStrings = configObj.cfg.indefStrings | ||
if indefStrings[args.expiry] then | if indefStrings[args.expiry] then | ||
self. | self.expiry = 'indef' | ||
elseif type(args.expiry) == 'number' then | elseif type(args.expiry) == 'number' then | ||
self. | self.expiry = args.expiry | ||
else | else | ||
self. | self.expiry = validateDate(args.expiry, 'expiry date') | ||
end | end | ||
end | end | ||
Line 240: | Line 240: | ||
function Blurb:_makeDisputeBlurbParameter() | function Blurb:_makeDisputeBlurbParameter() | ||
local expiry = self._protectionObj | local expiry = self._protectionObj.expiry | ||
if type(expiry) == 'number' then | if type(expiry) == 'number' then | ||
return self:_getExpandedMessage('dispute-blurb-expiry') | return self:_getExpandedMessage('dispute-blurb-expiry') | ||
Line 294: | Line 294: | ||
function Blurb:_makeExpiryParameter() | function Blurb:_makeExpiryParameter() | ||
local expiry = self._protectionObj | local expiry = self._protectionObj.expiry | ||
if expiry == 'indef' then | if expiry == 'indef' then | ||
return nil | return nil | ||
Line 353: | Line 353: | ||
function Blurb:_makeIntroBlurbParameter() | function Blurb:_makeIntroBlurbParameter() | ||
local expiry = self._protectionObj | local expiry = self._protectionObj.expiry | ||
if type(expiry) == 'number' then | if type(expiry) == 'number' then | ||
return self:_getExpandedMessage('intro-blurb-expiry') | return self:_getExpandedMessage('intro-blurb-expiry') | ||
Line 461: | Line 461: | ||
function Blurb:_makeTooltipBlurbParameter() | function Blurb:_makeTooltipBlurbParameter() | ||
local expiry = self._protectionObj | local expiry = self._protectionObj.expiry | ||
if type(expiry) == 'number' then | if type(expiry) == 'number' then | ||
return self:_getExpandedMessage('tooltip-blurb-expiry') | return self:_getExpandedMessage('tooltip-blurb-expiry') | ||
Line 535: | Line 535: | ||
local action = protectionObj.action | local action = protectionObj.action | ||
local level = protectionObj.level | local level = protectionObj.level | ||
local expiry = protectionObj | local expiry = protectionObj.expiry | ||
local namespace = titleObj.namespace | local namespace = titleObj.namespace | ||
Line 709: | Line 709: | ||
-- Get the expiry. | -- Get the expiry. | ||
local expiry = protectionObj | local expiry = protectionObj.expiry | ||
if type(expiry) == 'number' then | if type(expiry) == 'number' then | ||
expiry = 'temp' | expiry = 'temp' | ||
Line 866: | Line 866: | ||
local reasonsWithoutExpiryCheck = configObj.cfg.reasonsWithoutExpiryCheck | local reasonsWithoutExpiryCheck = configObj.cfg.reasonsWithoutExpiryCheck | ||
local expiryCheckActions = configObj.cfg.expiryCheckActions | local expiryCheckActions = configObj.cfg.expiryCheckActions | ||
local expiry = protectionObj | local expiry = protectionObj.expiry | ||
local action = protectionObj.action | local action = protectionObj.action | ||
local reason = protectionObj.reason | local reason = protectionObj.reason | ||
Line 890: | Line 890: | ||
local protectionObj = self._protectionObj | local protectionObj = self._protectionObj | ||
local expiry = protectionObj | local expiry = protectionObj.expiry | ||
local action = protectionObj.action | local action = protectionObj.action | ||
local level = protectionObj.level | local level = protectionObj.level |