Module:Portal: Difference between revisions

alphabetize "default image" tracking category
imported>Hike395
(cleanup/fix displayAll and imageDupes to remove stored image args)
(alphabetize "default image" tracking category)
Line 237: Line 237:
local contents = {}
local contents = {}
-- Display the portals specified in the positional arguments.
-- Display the portals specified in the positional arguments.
local defaultUsed = false
local defaultUsed = nil
for _, portal in ipairs(portals) do
for _, portal in ipairs(portals) do
local portalImage = getImageName(portal)
local portalImage = getImageName(portal)
if portalImage == defaultImage then
if portalImage == defaultImage then
defaultUsed = true
defaultUsed = portal
end
end
local image = string.format('[[File:%s|32x28px|class=noviewer]]',
local image = string.format('[[File:%s|32x28px|class=noviewer]]',
Line 250: Line 250:
end
end
if defaultUsed and checkTracking() then
if defaultUsed and checkTracking() then
root:wikitext('[[Category:Portal templates with default image]]')
local cat = string.format('[[Category:Portal templates with default image|%s]]',
                      defaultUsed)
root:wikitext(cat)
end
end
return tostring(fillBox(root, contents))
return tostring(fillBox(root, contents))
Anonymous user