Skip importing uncertain birth years in Wikidata fetcher
This commit is contained in:
parent
027d4b3506
commit
ece1e44a9e
|
@ -682,7 +682,11 @@ final class NodaWikidataFetcher {
|
||||||
if ($actor_dates['persinst_geburtsjahr'] === '') {
|
if ($actor_dates['persinst_geburtsjahr'] === '') {
|
||||||
|
|
||||||
// Try to get birth date
|
// Try to get birth date
|
||||||
if (!empty($data['claims']['P569']) and !empty($data['claims']['P569']['0']['mainsnak']['datavalue']['value']['time'])) {
|
if (!empty($data['claims']['P569'])
|
||||||
|
and !empty($data['claims']['P569']['0']['mainsnak']['datavalue']['value']['time'])
|
||||||
|
// Ignore entries with century / very inprecise birth dates
|
||||||
|
and (empty($data['claims']['P569']['0']['mainsnak']['datavalue']['value']['precision']) || (int)$data['claims']['P569']['0']['mainsnak']['datavalue']['value']['precision'] !== 7)
|
||||||
|
) {
|
||||||
$birth_date = self::wikidataBirthDeathToYear($data['claims']['P569']['0']['mainsnak']['datavalue']['value']['time']);
|
$birth_date = self::wikidataBirthDeathToYear($data['claims']['P569']['0']['mainsnak']['datavalue']['value']['time']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user