Content deleted Content added
Inline single-use "_getvalue" function |
No edit summary |
||
Line 1,063:
-------------------------------------------------------------------------------
p.getValueByQual = function(frame)
local qualID = frame.args
-- The Q-id of the value for the qualifier we want to match is in named parameter |qvalue=
local qval = frame.args.qvalue or ""
Line 1,111:
local propertyID = mw.text.trim(frame.args[1] or "")
if propertyID == "" then return "no property supplied" end
if qualID == "" then return "no qualifier supplied" end
Line 1,146 ⟶ 1,144:
-- We'll only deal with wikibase-items for now
if v1q[qualID][1].datatype == "wikibase-item" then
if checkvalue(v1q[qualID][1].datavalue.value.id
out[#out + 1] = v1.mainsnak.datavalue.value
end
|