Module:Protection banner: Difference between revisions

no need to special case indef expiry. if it's indef, the messages that get used don't use it anyway
Enwikipedia>Jackmcbarn
(simplify _substituteParameters)
Enwikipedia>Jackmcbarn
(no need to special case indef expiry. if it's indef, the messages that get used don't use it anyway)
Line 471:
function Blurb:_makeExpiryParameter()
local expiry = self._protectionObj.expiry
if type(expiry) == 'indefnumber' then
return nil
elseif type(expiry) == 'number' then
return Blurb.formatDate(expiry)
else
elseif expiry then
-- Expiry is an error string.
return expiry
end