Module:Documentation: Difference between revisions

mNo edit summary
m Remove debugging logs
Line 148: Line 148:
local badDoc = args.baddoc
local badDoc = args.baddoc


mw.logObject( badDoc, 'Module:Documentation: badDoc' )
if badDoc then
if badDoc then
static.Documentation.badDoc = '1'
static.Documentation.badDoc = '1'
Line 161: Line 160:


local docPage = mw.title.new( args.page or i18n.commonNamespacedPageWithSub:format( page.nsText, page.baseText, i18n.defaultDocPage ) )
local docPage = mw.title.new( args.page or i18n.commonNamespacedPageWithSub:format( page.nsText, page.baseText, i18n.defaultDocPage ) )
mw.logObject( docPage, 'Module:Documentation: docPage' )
mw.logObject( page, 'Module:Documentation: page' )
if docPage ~= page then return end
if docPage ~= page then return end


Line 183: Line 180:
body:wikitext( i18n.commonInternalLink:format( i18n.commonNamespacedPage:format( i18n.namespaceCategory, i18n.docPageCategory ) ) )
body:wikitext( i18n.commonInternalLink:format( i18n.commonNamespacedPage:format( i18n.namespaceCategory, i18n.docPageCategory ) ) )
end
end
mw.logObject( body, 'Module:Documentation: body' )


return loadStyles( i18n.defaultStyles ) .. tostring( body )
return loadStyles( i18n.defaultStyles ) .. tostring( body )
Line 220: Line 215:
docText = trim( f:expandTemplate{ title = ':' .. docPage.fullText } )
docText = trim( f:expandTemplate{ title = ':' .. docPage.fullText } )
if static.Documentation.badDoc and static.Documentation.badDoc == '1' then
if static.Documentation.badDoc and static.Documentation.badDoc == '1' then
mw.logObject( static, 'static' )
badDoc = 1
badDoc = 1
end
end