Module:Documentation: Difference between revisions

Fix doc preload
Changed the categories "No/bad doc" and "Doc page" to not be added on user pages, as the former should only be changed by the owner (making the categoryuseless), and the latter is not very relevant to the category anyways
Line 89: Line 89:
body:wikitext( "<br>'''This ", pageType, "'s documentation needs improving or additional information.'''" )
body:wikitext( "<br>'''This ", pageType, "'s documentation needs improving or additional information.'''" )
end
end
if not args.nocat then
if not ( args.nocat or namespace == 'User' ) then
body:wikitext( '[[Category:Documentation pages]]' )
body:wikitext( '[[Category:Documentation pages]]' )
end
end
Line 142: Line 142:
message = "'''This " .. pageType .. " has no documentation. " ..
message = "'''This " .. pageType .. " has no documentation. " ..
"If you know how to use this " .. pageType .. ", please create it.'''"
"If you know how to use this " .. pageType .. ", please create it.'''"
if not args.nocat then
if not ( args.nocat or namespace == 'User' ) then
category = 'Category:' .. pageType .. 's with no documentation'
category = 'Category:' .. pageType .. 's with no documentation'
if not mw.title.new( category ).exists then
if not mw.title.new( category ).exists then
Line 151: Line 151:
colour = 'F9F2EA'
colour = 'F9F2EA'
message = "'''This " .. pageType .. "'s documentation needs improving or additional information.'''\n"
message = "'''This " .. pageType .. "'s documentation needs improving or additional information.'''\n"
if not args.nocat then
if not ( args.nocat or namespace == 'User' ) then
category = 'Category:' .. pageType .. 's with bad documentation'
category = 'Category:' .. pageType .. 's with bad documentation'
if not mw.title.new( category ).exists then
if not mw.title.new( category ).exists then