Content deleted Content added
Tom.Reding (talk | contribs) Fix? |
Tom.Reding (talk | contribs) +more formal conf error checks (bConfError) |
||
Line 94:
}
local outString = nil
local bConfError = false
--prelim namespace/title determination
Line 198 ⟶ 199:
nextCent = currCent + 1
else
bConfError = true
trackingCategories[2] = '[[Category:Described in year error|N]]' --invalid category name
end
--conf error checkng (missing keys)
if bConfError == false then
if conf[currGroup] == nil then
bConfError = true
trackingCategories[2] = '[[Category:Described in year error|1]]' --group (e.g. 'Fish', 'Spiders', etc.) key missing from conf
elseif conf[currGroup][currYDC] == nil then
bConfError = true
trackingCategories[2] = '[[Category:Described in year error|2]]' --year/decade/century key missing
else
if conf[currGroup][currYDC].description == nil then
bConfError = true
trackingCategories[2] = '[[Category:Described in year error|3]]' --description key missing
end
if conf[currGroup][currYDC].parent1 == nil then
bConfError = true
trackingCategories[2] = '[[Category:Described in year error|4]]' --parent key missing
end
end
end
--produce description & toc
if
if conf[currGroup] and conf[currGroup][currYDC] and conf[currGroup][currYDC].description then
description = conf[currGroup][currYDC].description
Line 227 ⟶ 249:
--produce cats & navs
if
local iparent = 1
local parenti = 'parent' .. iparent
Line 284 ⟶ 306:
parenti = 'parent' .. iparent
end --while conf[currGroup][currYDC][parenti] do
end --if
--check for non-existent cats
|