Modifica di Modulo:WikidataIB
Questa modifica può essere annullata. Controlla le differenze mostrate sotto fra le due versioni per essere certo che il contenuto corrisponda a quanto desiderato, e quindi pubblicare le modifiche per completare la procedura di annullamento.
Versione attuale | Il tuo testo | ||
Riga 3 250: | Riga 3 250: | ||
local url = frame.args.url or "" | local url = frame.args.url or "" | ||
if url:upper() == "NONE" then return nil end | if url:upper() == "NONE" then return nil end | ||
local qid = frame.args.qid or "" | |||
if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end | |||
if not qid then return nil end | |||
local urls = {} | local urls = {} | ||
local quals = {} | local quals = {} | ||
if url == "" then | |||
if url | |||
local prop856 = mw.wikibase.getBestStatements(qid, "P856") | local prop856 = mw.wikibase.getBestStatements(qid, "P856") | ||
for k, v in pairs(prop856) do | for k, v in pairs(prop856) do | ||
Riga 3 272: | Riga 3 271: | ||
end -- test for website having a value | end -- test for website having a value | ||
end -- loop through website(s) | end -- loop through website(s) | ||
else | |||
urls[1] = url | |||
end | end | ||
if #urls == 0 then return nil end | if #urls == 0 then return nil end |