Module:ImageGallery: Difference between revisions

no edit summary
(Created page with "local p = {} local cargo = mw.ext.cargo function p.list(frame) local charName = frame.args[1] local header = frame.args[2] local imageType = frame.args[3] local query = { limit = '1000', where = 'Gallery_Image.characters HOLDS "' .. charName .. '"', } if imageType == 'other' then query.where = query.where .. ' AND (Gallery_Image.type == "other"' .. ' or Gallery_Image.type IS NULL)' else query.where = query.where .. ' AND Gallery_Image.type == "' .....")
 
No edit summary
Line 11: Line 11:
}
}
if imageType == 'other' then
if imageType == 'other' then
query.where = query.where .. ' AND (Gallery_Image.type == "other"'
query.where = query.where .. ' AND (Gallery_Image.type = "other"'
.. ' or Gallery_Image.type IS NULL)'
.. ' OR Gallery_Image.type IS NULL)'
else
else
query.where = query.where .. ' AND Gallery_Image.type == "'
query.where = query.where .. ' AND Gallery_Image.type = "'
.. imageType .. '"'
.. imageType .. '"'
end
end