Fix bug in preventing impossible noda relations
This commit is contained in:
parent
340bfac96c
commit
93cd09ed23
@ -765,7 +765,7 @@ final class NodaWikidataFetcher {
|
||||
"wikidata" => $wikidata_id,
|
||||
];
|
||||
foreach (self::P_IDS_NODA_TAGS as $vocabName => $pId) {
|
||||
if (!isset(MDNodaRepositoriesSet::REPOSITORIES_ACTOR[$vocabName])) continue;
|
||||
if (!in_array($vocabName, MDNodaRepositoriesSet::REPOSITORIES_ACTOR, true)) continue;
|
||||
if ($vocabName === 'lcsh') continue;
|
||||
if (isset($data['claims'][$pId])) $nodaLinks[$vocabName] = $data['claims'][$pId][0]['mainsnak']['datavalue']['value'];
|
||||
}
|
||||
@ -1109,7 +1109,7 @@ final class NodaWikidataFetcher {
|
||||
"wikidata" => $wikidata_id,
|
||||
];
|
||||
foreach (self::P_IDS_NODA_TAGS as $vocabName => $pId) {
|
||||
if (!isset(MDNodaRepositoriesSet::REPOSITORIES_PLACE[$vocabName])) continue;
|
||||
if (!in_array($vocabName, MDNodaRepositoriesSet::REPOSITORIES_PLACE, true)) continue;
|
||||
if ($vocabName === 'lcsh') continue;
|
||||
if (isset($data['claims'][$pId])) $nodaLinks[$vocabName] = $data['claims'][$pId][0]['mainsnak']['datavalue']['value'];
|
||||
}
|
||||
@ -1498,7 +1498,7 @@ final class NodaWikidataFetcher {
|
||||
"wikidata" => $wikidata_id,
|
||||
];
|
||||
foreach (self::P_IDS_NODA_TAGS as $vocabName => $pId) {
|
||||
if (!isset(MDNodaRepositoriesSet::REPOSITORIES_TAG[$vocabName])) continue;
|
||||
if (!in_array($vocabName, MDNodaRepositoriesSet::REPOSITORIES_TAG, true)) continue;
|
||||
if ($vocabName === 'loc') continue;
|
||||
if (isset($data['claims'][$pId])) $nodaLinks[$vocabName] = $data['claims'][$pId][0]['mainsnak']['datavalue']['value'];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user