Modulo:Wikidata/sandbox: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
m fix
m uso funzione già esistente
Riga 745:
end
return ret
end
 
-- Restituisce true se gli statement di una proprietà di Wikidata
-- esistono e soddisfano i criteri indicati.
function p._checkProperty(args)
local propertyId, claims
 
propertyId = args[1] and string.upper(args[1])
if not propertyId then
error(i18n.errors['property-param-not-provided'], 2)
end
 
claims = getClaims(propertyId, args)
 
return claims and #claims > 0 and true or nil
end
 
Line 832 ⟶ 817:
function p.checkProperty(frame)
return select(2, xpcall(function()
return p._checkProperty_N(getArgs(frame, { parentOnly = true })) > 0 and 1 or ''
end, errhandler))
end