Skip to content

Commit

Permalink
Merge pull request #96 from JEALG/beta
Browse files Browse the repository at this point in the history
Typo Log
  • Loading branch information
Sekiro-kost authored Jun 5, 2024
2 parents 78f5444 + 4ff554c commit c68447f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
Binary file modified .DS_Store
Binary file not shown.
8 changes: 4 additions & 4 deletions core/api/mobile.api.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function checkDateMenu($menu, $mobile)
$dateMobile = $mobile->getConfiguration('DateMenu', 'pasdedate');
if (isset($dateMobile) && isset($menu['date'])) {
if ($dateMobile < $menu['date']) {
log::add('mobile', 'debug', 'SAVE MENU DEPUIS L APP');
log::add('mobile', 'debug', '| Sauvegarde Menu depuis L APP');
saveMenuFromAppV2($menu, $mobile);
}
} else {
Expand All @@ -80,7 +80,7 @@ function checkDateMenu($menu, $mobile)

function saveMenuFromAppV2($menu, $mobile)
{
log::add('mobile', 'debug', 'MENU_SAVE_FRM_APPV2 ' . json_encode($menu));
log::add('mobile', 'debug', '| Menu sauvegarde FRM / APPV2 ' . json_encode($menu));
if (is_object($mobile)) {
$menuCustomArray = [];
$count = 0;
Expand Down Expand Up @@ -717,8 +717,8 @@ function saveMenuFromAppV2($menu, $mobile)
}

if ($jsonrpc->getMethod() == 'deleteGeolocCommand') {
log::add('mobile', 'debug', 'Delete geoloc command');
log::add('mobile', 'debug', 'Params > ' . json_encode($params));
log::add('mobile', 'debug', '| -- Commande suppression GeoLoc --');
log::add('mobile', 'debug', '| Paramètres > ' . json_encode($params));
$geolocId = $params['geoloc_id'];
$eqLogic = eqLogic::byLogicalId($params['Iq'], 'mobile');
if (is_object($eqLogic)) {
Expand Down
18 changes: 9 additions & 9 deletions core/class/mobile.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ public function SaveGeoloc($geoloc)
$eqLogicMobile = eqLogic::byLogicalId($geoloc['Iq'], 'mobile');
log::add('mobile', 'debug', '| Iq = ' . $geoloc['Iq']);
if (is_object($eqLogicMobile)) {
log::add('mobile', 'debug', '| Mobile bien trouvé dans cette Jeedom');
log::add('mobile', 'debug', '| Mobile bien trouvé dans cette Box');
log::add('mobile', 'debug', '| Objet > ' . $eqLogicMobile->getId());
$cmdgeoloc = cmd::byEqLogicIdAndLogicalId($eqLogicMobile->getId(), 'geoId_' . $geoloc['id']);
if (!is_object($cmdgeoloc)) {
Expand Down Expand Up @@ -904,7 +904,7 @@ public static function createCmdGeoLocV2($Iq, $geolocs)
$decodedGeolocs = json_decode($geolocs, true);
foreach ($decodedGeolocs as $index => $geoloc) {
if (!isset($geoloc['name'])) continue;
log::add('mobile', 'debug', '| index > ' . $index . ' / ' . $geoloc['name']);
log::add('mobile', 'debug', '| Index > ' . $index . ' / ' . $geoloc['name']);
$cmdgeoloc = cmd::byEqLogicIdAndLogicalId($mobile->getId(), 'geoloc_' . $index);

if (!is_object($cmdgeoloc)) {
Expand All @@ -925,7 +925,7 @@ public static function createCmdGeoLocV2($Iq, $geolocs)
$cmdgeoloc->save();
if ($noExistCmd == 1) {
$cmdgeoloc->event($geoloc['value']);
log::add('mobile', 'debug', '| valeur enregistrée > ' . $geoloc['value']);
log::add('mobile', 'debug', '| Valeur enregistrée > ' . $geoloc['value']);
}
$noExistCmd = 0;
}
Expand All @@ -937,7 +937,7 @@ public static function createCmdGeoLocV2($Iq, $geolocs)

public function delGeoloc($geoloc)
{
log::add('mobile', 'debug', 'Geoloc lancement DEL du mobile > ' . $geoloc['Iq'] . ' pour ' . $geoloc['id']);
log::add('mobile', 'debug', '| Geoloc lancement DEL du mobile > ' . $geoloc['Iq'] . ' pour ' . $geoloc['id']);
$eqLogicMobile = eqLogic::byLogicalId($geoloc['Iq'], 'mobile');
$cmdgeoloc = cmd::byEqLogicIdAndLogicalId($eqLogicMobile->getId(), 'geoId_' . $geoloc['id']);
if (isset($cmdgeoloc)) {
Expand All @@ -954,19 +954,19 @@ public function EventGeoloc($geoloc)
if (is_object($cmdgeoloc)) {
log::add('mobile', 'debug', '| Commande trouvé');
if ($geoloc['value'] !== $cmdgeoloc->execCmd()) {
log::add('mobile', 'debug', 'Valeur non pareille.');
log::add('mobile', 'debug', 'Valeur non identique');
$cmdgeoloc->event($geoloc['value']);
} else {
log::add('mobile', 'debug', '| Valeur pareille >' . $geoloc['value'] . ' / ' . $cmdgeoloc->execCmd());
log::add('mobile', 'debug', '| Valeur identique >' . $geoloc['value'] . ' / ' . $cmdgeoloc->execCmd());
}
}
if (is_object($cmdgeolocv2)) {
log::add('mobile', 'debug', '| Commande trouvé');
if ($geoloc['value'] !== $cmdgeolocv2->execCmd()) {
log::add('mobile', 'debug', 'Valeur non pareille.');
log::add('mobile', 'debug', 'Valeur non identique');
$cmdgeolocv2->event($geoloc['value']);
} else {
log::add('mobile', 'debug', '| Valeur pareille >' . $geoloc['value'] . ' / ' . $cmdgeolocv2->execCmd());
log::add('mobile', 'debug', '| Valeur identique >' . $geoloc['value'] . ' / ' . $cmdgeolocv2->execCmd());
}
}
}
Expand Down Expand Up @@ -1523,7 +1523,7 @@ public function execute($_options = array())

log::add('mobile', 'debug', '| Action : Envoi d\'une configuration ', 'config');
} else {
log::add('mobile', 'debug', 'ARN non configuré ', 'config');
log::add('mobile', 'debug', '| ARN non configuré ', 'config');
}
log::add('mobile', 'debug', '|-----------------------------------');
}
Expand Down

0 comments on commit c68447f

Please sign in to comment.