Content deleted Content added
fix for wrong year returned when Wikidata has a year stored as an invalid date - checked in sandbox |
update from /sandbox: delimiter and arbitrary access for some calls |
||
Line 513:
local propertyID = mw.text.trim(frame.args[1] or "")
local input_parm = mw.text.trim(frame.args[2] or "")
local delim = mw.text.trim(frame.args.delimiter or ", ")
local qid = frame.args.qid
if qid and (#qid == 0) then qid = nil end
if input_parm == "FETCH_WIKIDATA" then
local entity = mw.wikibase.getEntityObject(qid)
local claims
if entity and entity.claims then
Line 534 ⟶ 537:
end
end
return table.concat(out,
else
-- just return best values
Line 695 ⟶ 698:
local propertyID = mw.text.trim(frame.args[1] or "")
local input_parm = mw.text.trim(frame.args[2] or "")
local qid = frame.args.qid
if qid and (#qid == 0) then qid = nil end
if input_parm == "FETCH_WIKIDATA" then
local entity = mw.wikibase.getEntityObject(qid)
local claims
if entity and entity.claims then claims = entity.claims[propertyID] end
|