Changes
add a Protection:isTemporary method
function Protection:isProtected()
return self.level ~= '*'
end
function Protection:isTemporary()
return type(self.expiry) == 'number'
end
function Blurb:_makeIntroBlurbParameter()
if type(self._protectionObj.expiry:isTemporary() == 'number' then
return self:_getExpandedMessage('intro-blurb-expiry')
else
function Blurb:_makeTooltipBlurbParameter()
if type(self._protectionObj.expiry:isTemporary() == 'number' then
return self:_getExpandedMessage('tooltip-blurb-expiry')
else
local action = protectionObj.action
local level = protectionObj.level
local namespace = protectionObj.title.namespace
and action == 'edit'
and level == 'sysop'
and not protectionObj:isTemporary(not expiry or expiry == 'indef')
then
-- Fully protected modules and templates get the special red "indef"