Skip to content

Commit

Permalink
Update vigilancemeteo.class.php
Browse files Browse the repository at this point in the history
  • Loading branch information
lunarok authored Apr 25, 2020
1 parent 1f46208 commit be61231
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions core/class/vigilancemeteo.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,13 @@ public function postUpdate() {
if ($this->getConfiguration('geoloc') == "jeedom") {
$postal = config::byKey('info::postalCode');
$departement = $postal[0] . $postal[1];
if ($departement == '20') {
if ($postal[2] <= '1') {
$departement = '2A';
} else {
$departement = '2B';
}
}
} else {
$departement = geotravCmd::byEqLogicIdAndLogicalId($this->getConfiguration('geoloc'),'location:department')->execCmd();
}
Expand Down Expand Up @@ -756,6 +763,13 @@ public function getPollen() {
}
if ($geoloc == "jeedom") {
$departement = substr(config::byKey('info::postalCode'),0,2);
if ($departement == '20') {
if ($postal[2] <= '1') {
$departement = '2A';
} else {
$departement = '2B';
}
}
} else {
$geotrav = eqLogic::byId($geoloc);
if (is_object($geotrav) && $geotrav->getEqType_name() == 'geotrav') {
Expand Down Expand Up @@ -970,6 +984,13 @@ public function getLink() {
if ($this->getConfiguration('geoloc') == "jeedom") {
$postal = config::byKey('info::postalCode');
$departement = $postal[0] . $postal[1];
if ($departement == '20') {
if ($postal[2] <= '1') {
$departement = '2A';
} else {
$departement = '2B';
}
}
} else {
$departement = geotravCmd::byEqLogicIdAndLogicalId($this->getConfiguration('geoloc'),'location:department')->execCmd();
}
Expand Down

0 comments on commit be61231

Please sign in to comment.