Module:Protection banner: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(make Blurb be responsible for setting its own fields) |
(put Protection in charge of generating its own category links) |
||
Line 301:
end
function Protection:
local cfg = self._cfg
and cfg.expiryCheckActions[self.action]
and self.reason -- the old {{pp-protected}} didn't check for expiry
and not cfg.reasonsWithoutExpiryCheck[self.reason]
return makeCategoryLink(self._cfg.msg['tracking-category-expiry'])▼
end▼
end
function Protection:
local expiry = self.expiry
or type(expiry) == 'number' and expiry < os.time()
return makeCategoryLink(self._cfg.msg['tracking-category-incorrect'])▼
end▼
end
function Protection:
local action, namespace = self.action, self.title.namespace
and (
(action ~= 'edit' and action ~= 'move')
or (namespace ~= 10 and namespace ~= 828)
)
end
return makeCategoryLink(self._cfg.msg['tracking-category-template'])▼
function Protection:makeCategoryLinks()
local msg = self._cfg.msg
local ret = { self:makeProtectionCategory() }
if self:needsExpiry() then
▲ end
if self:isIncorrect() then
▲ end
if self:isTemplateProtectedNonTemplate() then
end
return table.concat(ret)
end
Line 916 ⟶ 922:
-- Render the categories
if yesno(args.category) ~= false then
ret[#ret + 1] = protectionObj:
end
|