Module:Infobox: Difference between revisions

No edit summary
No edit summary
Line 17: Line 17:
local grid
local grid
for k, v in pairs( args ) do
for k, v in pairs( args ) do
local image, num = k:match( '^(image)(%d+)$' )
if type( k ) == 'string' then
local invImage, invNum = k:match( '^(invimage)(%d+)$' )
local image, num = k:match( '^(image)(%d+)$' )
if v:lower() ~= 'none' then
local invImage, invNum = k:match( '^(invimage)(%d+)$' )
if image then
if v:lower() ~= 'none' then
table.insert( imgCount, tonumber( num ) )
if image then
elseif invImage then
table.insert( imgCount, tonumber( num ) )
table.insert( invImgCount, tonumber( invNum ) )
elseif invImage then
table.insert( invImgCount, tonumber( invNum ) )
end
end
end
end
end