Module:Category described in year/sandbox: Difference between revisions

Content deleted Content added
m Merge 2 related if's; --ce; var ce
m --ce
Line 346:
local currCat = nil
local currQID = nil
if currentTitle.namespace == 14 then --Category:category namespace
currCat = currentTitle.text --without namespace nor interwiki prefixes
currQID = mw.wikibase.getEntityIdForCurrentPage()
else
--accept 1 unnamed category parameter if not in Category:category spacenamespace; required for testing/doc/etc purposes
local parentArg = frame:getParent().args[1]
if parentArg then
Line 357:
else --currQID & currCat both nil
if currentTitle.fullText ~= 'Template:Category described in year' then --ignore self...
trackingCategories[2] = '[[Category:Described in year error|P]]' --missing a category parameter outside category-space namespace
end
end
Line 643:
--append cats to outString
if currentTitle.namespace == 14 then --Category:category namespace
if table.maxn(categories) > 0 then outString = outString .. table.concat(categories) end
outString = outString .. table.concat(trackingCategories)