Skip to content
Snippets Groups Projects
Commit 4a48ebec authored by Fabrice Gangler's avatar Fabrice Gangler :art:
Browse files

FIX

parent e4679d9a
No related branches found
No related tags found
No related merge requests found
......@@ -200,9 +200,14 @@ function run($rgId) {
$dptLinkWikipediaI18nEn = $dpt->sitelinks->enwiki->url;
///////////////////////////////////////
$dptExtraData = $dpt->claims;
$dptInseeId = $dptExtraData->P2586[0]->mainsnak->datavalue->value;
$dptInseeUrlStat = "https://www.insee.fr/fr/statistiques?geo=DEP-$dptInseeId";
$dptInseeUrlGeo = "https://www.insee.fr/fr/metadonnees/cog/departement/DEP$dptInseeId-".slugify($dptName);
$dptInseeId = '';
$dptInseeUrlStat = '';
$dptInseeUrlGeo = '';
if(isset($dptExtraData->P2586[0]->mainsnak->datavalue->value)) {
$dptInseeId = $dptExtraData->P2586[0]->mainsnak->datavalue->value;
$dptInseeUrlStat = "https://www.insee.fr/fr/statistiques?geo=DEP-$dptInseeId";
$dptInseeUrlGeo = "https://www.insee.fr/fr/metadonnees/cog/departement/DEP$dptInseeId-".slugify($dptName);
}
$dptOsmId = $dptExtraData->P402[0]->mainsnak->datavalue->value;
$dptOsmUrl = "https://www.openstreetmap.org/relation/$dptOsmId";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment