Difference between revisions of "Module:Message box"

Jump to navigation Jump to search
42 bytes removed ,  15:13, 13 October 2013
require name parameter for ambox
>Mr. Stradivarius
(indentation tweak)
>Mr. Stradivarius
(require name parameter for ambox)
Line 350: Line 350:


-- Add template-namespace categories.
-- Add template-namespace categories.
self.isTemplatePage = type(self.name) == 'string' and self.title.prefixedText == ('Template:' .. self.name)
if cfg.templateCategory then
if cfg.templateCategory then
if self.name then
if cfg.templateCategoryRequireName then
self.isTemplatePage = type(self.name) == 'string' and self.title.prefixedText == ('Template:' .. self.name)
if self.isTemplatePage then
if self.isTemplatePage then
self:addCat('template', cfg.templateCategory)
self:addCat('template', cfg.templateCategory)
Line 367: Line 367:
if not self.name and not self.title.isSubpage then
if not self.name and not self.title.isSubpage then
templateCat = templateErrorCategory
templateCat = templateErrorCategory
elseif type(self.name) == 'string' and self.title.prefixedText == ('Template:' .. self.name) then
elseif self.isTemplatePage then
local paramsToCheck = cfg.templateErrorParamsToCheck or {}
local paramsToCheck = cfg.templateErrorParamsToCheck or {}
local count = 0
local count = 0
Anonymous user

Navigation menu