Module:Article stub box: Difference between revisions

Content deleted Content added
replace |link box= value with Lua; streamlined code to
mNo edit summary
Line 40:
ts = 'tempsort' .. v
}
wikitextif = wikitext .. (v =~= '' andor args[key.ts] =~= 'no' andthen
wikitext = wikitext .. category('S', page{args[key.text)cat]
''
or category{args[key.cat]
.. (page and--True if catStub called by p.templatepage
('|' .. (
Line 51 ⟶ 50:
)
}
)end
if page then
if not mw.title.new('Category:' .. args[key.cat]).exists then
table.insert(missingCats, key.cat)
end
hasDoc = v == '' and pageDoc.exists or false
if vwikitext == '' thenwikitext
.. (hasDoc = pageDoc.existsand
wikitext = wikitext .. (hasDoc and '[[Category:Stub message templates with documentation subpages]]' or '')
if not hasDoc and or (not string.match(args[key.cat], ' stubs$') thenand category('S', page.text))
end
or ''
if not hasDoc and not string.match(args[key.cat], ' stubs$') then
'' )
wikitext = wikitext .. category('S', page.text)
end
stubCats[k] = {args[key.cat], key.cat}--values to be used in population()
end