Anonymous user
Module:Protection banner: Difference between revisions
add a Protection:isTemporary method
Enwikipedia>Mr. Stradivarius (add red padlocks when expiry is explicitly set to indefinite) |
Enwikipedia>Mr. Stradivarius (add a Protection:isTemporary method) |
||
Line 157:
function Protection:isProtected()
return self.level ~= '*'
end
function Protection:isTemporary()
return type(self.expiry) == 'number'
end
Line 512 ⟶ 516:
function Blurb:_makeIntroBlurbParameter()
if
return self:_getExpandedMessage('intro-blurb-expiry')
else
Line 599 ⟶ 603:
function Blurb:_makeTooltipBlurbParameter()
if
return self:_getExpandedMessage('tooltip-blurb-expiry')
else
Line 659 ⟶ 663:
local action = protectionObj.action
local level = protectionObj.level
local namespace = protectionObj.title.namespace
Line 666 ⟶ 669:
and action == 'edit'
and level == 'sysop'
and
then
-- Fully protected modules and templates get the special red "indef"
|