Validate geonames and TGN IDs fetched from Wikidata
This commit is contained in:
parent
20f609f6d0
commit
52a90d669c
|
@ -1102,8 +1102,8 @@ final class NodaWikidataFetcher {
|
|||
$currentPlaceResult->close();
|
||||
unset($currentPlaceResult);
|
||||
|
||||
if (isset($data['claims']['P1566'])) $geonames_id = $data['claims']['P1566'][0]['mainsnak']['datavalue']['value'];
|
||||
if (isset($data['claims']['P1667'])) $tgn_id = $data['claims']['P1667'][0]['mainsnak']['datavalue']['value'];
|
||||
if (isset($data['claims']['P1566'])) $geonames_id = filter_var($data['claims']['P1566'][0]['mainsnak']['datavalue']['value'], FILTER_VALIDATE_INT);
|
||||
if (isset($data['claims']['P1667'])) $tgn_id = filter_var($data['claims']['P1667'][0]['mainsnak']['datavalue']['value'], FILTER_VALIDATE_INT);
|
||||
|
||||
$nodaLinks = [
|
||||
"wikidata" => $wikidata_id,
|
||||
|
|
Loading…
Reference in New Issue
Block a user