Skip to content

Commit

Permalink
Network layout: using default image if user one no longer exists
Browse files Browse the repository at this point in the history
  • Loading branch information
tcharp38 committed Dec 8, 2023
1 parent 6a0a323 commit ce79b69
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions desktop/php/AbeilleNetworkMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@
'mapFile' => 'AbeilleNetworkMap-1200.png'
);
}
// Checking that image exists
foreach ($networkMap['levels'] as $levIdx => $lev) {
$path = __DIR__.'/';
$path .= (isset($lev['mapDir']) ? $lev['mapDir'] : 'images');
$path .= (isset($lev['mapFile']) ? $lev['mapFile'] : 'AbeilleNetworkMap-1200.png');
if (!file_exists($path)) {
$networkMap['levels'][$levIdx]['mapDir'] = 'images';
$networkMap['levels'][$levIdx]['mapFile'] = 'AbeilleNetworkMap-1200.png';
}
}
if (isset($nm['levelChoice']))
$networkMap['levelChoice'] = $nm['levelChoice'];
else
Expand Down
1 change: 1 addition & 0 deletions docs/fr_FR/Changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ChangeLog

- Interne: Mise-à-jour powerCycleUsb pour récuperer sortie 'dmesg' si erreur.
- Interne: AbeilleCmd: Pas de ACK sur requete LQI vers Zigate.
- Placement réseau: Utilisation image par défaut si plan n'existe plus.

231207-BETA-2
-------------
Expand Down

0 comments on commit ce79b69

Please sign in to comment.