「モジュール:Protection banner」の版間の差分

ナビゲーションに移動 検索に移動
remove expiry param (now also automatically retrieved for autoreview) and needsexpiry check
template>K-iczn
(en:Module:Protection banner 2016年8月4日 (木) 01:55‎(UTC)より)
module:infobox>Cenarium
(remove expiry param (now also automatically retrieved for autoreview) and needsexpiry check)
132行目: 132行目:
elseif effectiveExpiry ~= 'unknown' then
elseif effectiveExpiry ~= 'unknown' then
obj.expiry = validateDate(effectiveExpiry, 'expiry date')
obj.expiry = validateDate(effectiveExpiry, 'expiry date')
elseif args.expiry then
if cfg.indefStrings[args.expiry] then
obj.expiry = 'indef'
elseif type(args.expiry) == 'number' then
obj.expiry = args.expiry
else
obj.expiry = validateDate(args.expiry, 'expiry date')
end
end
end


313行目: 305行目:
end
end
return ''
return ''
end
function Protection:needsExpiry()
local cfg = self._cfg
local actionNeedsCheck = cfg.expiryCheckActions[self.action]
return not self.expiry and (
actionNeedsCheck or (
actionNeedsCheck == nil
and self.reason -- the old {{pp-protected}} didn't check for expiry
and not cfg.reasonsWithoutExpiryCheck[self.reason]
)
)
end
end


345行目: 325行目:
local msg = self._cfg.msg
local msg = self._cfg.msg
local ret = { self:makeProtectionCategory() }
local ret = { self:makeProtectionCategory() }
if self:needsExpiry() then
ret[#ret + 1] = makeCategoryLink(
msg['tracking-category-expiry'],
self.title.text
)
end
if self:isIncorrect() then
if self:isIncorrect() then
ret[#ret + 1] = makeCategoryLink(
ret[#ret + 1] = makeCategoryLink(

案内メニュー