5,478
edits
(Created page with "local p = {} local cargo = mw.ext.cargo function p.events(frame) local songName = frame.args[1] if not songName then return end local escaped = string.gsub(songName, "'", "\'") local query = { where = "song_page='" .. escaped .. "'", } local fields = {'event_page', 'leg_name', 'day', 'cast'} local events = cargo.query('Setlist_Songs', table.concat(fields, ','), query) local text = '' for _, ev in ipairs(events) do text = text .. frame:expandTemplate{...") |
mNo edit summary |
||
Line 5: | Line 5: | ||
local songName = frame.args[1] | local songName = frame.args[1] | ||
if not songName then return end | if not songName then return end | ||
local escaped = string.gsub(songName, "'", "\'") | local escaped = string.gsub(songName, "'", "\\'") | ||
local query = { | local query = { | ||
where = "song_page='" .. escaped .. "'", | where = "song_page='" .. escaped .. "'", | ||
Line 20: | Line 20: | ||
} .. '\n' | } .. '\n' | ||
end | end | ||
return | return text | ||
end | end | ||
return p | return p |