Module:Documentation: Difference between revisions

Replace faulty dplvars
Add support for baddoc
Line 1: Line 1:
local p = {}
local p = {}
local defaultDocPage = 'doc'
local defaultDocPage = 'doc'
local static = require('Module:Static')


local getType = function( namespace, page )
local getType = function( namespace, page )
Line 61: Line 62:
local badDoc = args.baddoc
local badDoc = args.baddoc
mw.logObject(badDoc, "Module:Documentation: badDoc")
mw.logObject(badDoc, "Module:Documentation: badDoc")
if badDoc then
static.badDoc = '1'
end
local page = mw.title.getCurrentTitle()
local page = mw.title.getCurrentTitle()
Line 134: Line 138:
if not docText and not noDoc then
if not docText and not noDoc then
docText = trim( f:expandTemplate{ title = ':' .. docPage.fullText }  )
docText = trim( f:expandTemplate{ title = ':' .. docPage.fullText }  )
if static.badDoc and static.badDoc == '1' then
mw.logObject(static, "static")
badDoc = 1
end
if docText == '' then
if docText == '' then