Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Protection banner: Difference between revisions

From the Lonsdale Battalion wiki
Content deleted Content added
simplify _substituteParameters
no need to special case indef expiry. if it's indef, the messages that get used don't use it anyway
Line 471: Line 471:
function Blurb:_makeExpiryParameter()
function Blurb:_makeExpiryParameter()
local expiry = self._protectionObj.expiry
local expiry = self._protectionObj.expiry
if expiry == 'indef' then
if type(expiry) == 'number' then
return nil
elseif type(expiry) == 'number' then
return Blurb.formatDate(expiry)
return Blurb.formatDate(expiry)
else
elseif expiry then
-- Expiry is an error string.
return expiry
return expiry
end
end
Cookies help us deliver our services. By using our services, you agree to our use of cookies.