66 410
contributi
mNessun oggetto della modifica |
mNessun oggetto della modifica |
||
Riga 415: | Riga 415: | ||
-- @return A bullet list of backlinks | -- @return A bullet list of backlinks | ||
function p.ListBackReferences(frame) | function p.ListBackReferences(frame) | ||
local AllBackReferences = {} | |||
local QueryResult = mw.smw.ask('[[Riferimento::' .. mw.title.getCurrentTitle().text .. ']]|?DataTrek ID|format=broadtable') | local QueryResult = mw.smw.ask('[[Riferimento::' .. mw.title.getCurrentTitle().text .. ']]|?DataTrek ID|format=broadtable') | ||
Riga 420: | Riga 421: | ||
return "''Nessun risultato''" | return "''Nessun risultato''" | ||
else | else | ||
return table.concat(QueryResult, string.char(10)) | for _, Row in pairs(result) do | ||
local Items = {} | |||
for _, Field in pairs(Row) do | |||
Items[#Items + 1] = Field | |||
end | |||
AllBackReferences[#AllBackReferences + 1] = "*" .. table.concat(Items, ', ') | |||
end | |||
return table.concat(AllBackReferences, string.char(10)) | |||
-- return table.concat(QueryResult, string.char(10)) | |||
end | end | ||
end | end | ||
return p | return p |