Module:Message box: Difference between revisions

make invalid type errors depend on cfg.showInvalidTypeError
(add a template link when generating the subst error message)
(make invalid type errors depend on cfg.showInvalidTypeError)
Line 170:
self.type = args.type
local typeData = cfg.types[self.type]
self.invalidTypeinvalidTypeError = cfg.showInvalidTypeError and self.type and not typeData and true or false
typeData = typeData or cfg.types[cfg.default]
self.typeClass = typeData.class
Line 384:
 
-- Categories for all namespaces.
if self.invalidTypeinvalidTypeError then
local allSort = (nsid == 0 and 'Main:' or '') .. self.title.prefixedText
self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort)
Line 504:
 
-- Add error message for invalid type parameters.
if self.invalidTypeinvalidTypeError then
root
.tag('div')