Prevent attempts to write link noda repositories for the incorrect
linkable types (e.g. iconclass for places)
This commit is contained in:
parent
4a26ab60ca
commit
340bfac96c
|
@ -765,6 +765,7 @@ final class NodaWikidataFetcher {
|
||||||
"wikidata" => $wikidata_id,
|
"wikidata" => $wikidata_id,
|
||||||
];
|
];
|
||||||
foreach (self::P_IDS_NODA_TAGS as $vocabName => $pId) {
|
foreach (self::P_IDS_NODA_TAGS as $vocabName => $pId) {
|
||||||
|
if (!isset(MDNodaRepositoriesSet::REPOSITORIES_ACTOR[$vocabName])) continue;
|
||||||
if ($vocabName === 'lcsh') continue;
|
if ($vocabName === 'lcsh') continue;
|
||||||
if (isset($data['claims'][$pId])) $nodaLinks[$vocabName] = $data['claims'][$pId][0]['mainsnak']['datavalue']['value'];
|
if (isset($data['claims'][$pId])) $nodaLinks[$vocabName] = $data['claims'][$pId][0]['mainsnak']['datavalue']['value'];
|
||||||
}
|
}
|
||||||
|
@ -1108,6 +1109,7 @@ final class NodaWikidataFetcher {
|
||||||
"wikidata" => $wikidata_id,
|
"wikidata" => $wikidata_id,
|
||||||
];
|
];
|
||||||
foreach (self::P_IDS_NODA_TAGS as $vocabName => $pId) {
|
foreach (self::P_IDS_NODA_TAGS as $vocabName => $pId) {
|
||||||
|
if (!isset(MDNodaRepositoriesSet::REPOSITORIES_PLACE[$vocabName])) continue;
|
||||||
if ($vocabName === 'lcsh') continue;
|
if ($vocabName === 'lcsh') continue;
|
||||||
if (isset($data['claims'][$pId])) $nodaLinks[$vocabName] = $data['claims'][$pId][0]['mainsnak']['datavalue']['value'];
|
if (isset($data['claims'][$pId])) $nodaLinks[$vocabName] = $data['claims'][$pId][0]['mainsnak']['datavalue']['value'];
|
||||||
}
|
}
|
||||||
|
@ -1496,6 +1498,7 @@ final class NodaWikidataFetcher {
|
||||||
"wikidata" => $wikidata_id,
|
"wikidata" => $wikidata_id,
|
||||||
];
|
];
|
||||||
foreach (self::P_IDS_NODA_TAGS as $vocabName => $pId) {
|
foreach (self::P_IDS_NODA_TAGS as $vocabName => $pId) {
|
||||||
|
if (!isset(MDNodaRepositoriesSet::REPOSITORIES_TAG[$vocabName])) continue;
|
||||||
if ($vocabName === 'loc') continue;
|
if ($vocabName === 'loc') continue;
|
||||||
if (isset($data['claims'][$pId])) $nodaLinks[$vocabName] = $data['claims'][$pId][0]['mainsnak']['datavalue']['value'];
|
if (isset($data['claims'][$pId])) $nodaLinks[$vocabName] = $data['claims'][$pId][0]['mainsnak']['datavalue']['value'];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user