From 96c113808974c78dabd98e014c6ce5cee50ffe02 Mon Sep 17 00:00:00 2001 From: David <79108364+Phpvarious@users.noreply.github.com> Date: Thu, 14 May 2026 14:29:48 +0200 Subject: [PATCH 1/9] Update mobile.class.php --- core/class/mobile.class.php | 189 ++++++++++++++++++++++-------------- 1 file changed, 117 insertions(+), 72 deletions(-) diff --git a/core/class/mobile.class.php b/core/class/mobile.class.php index 89dd8a4b..ec5b8293 100755 --- a/core/class/mobile.class.php +++ b/core/class/mobile.class.php @@ -694,7 +694,7 @@ public static function deleteFileImg() public static function jsonPublish($os, $titre, $message, $type, $idNotif, $answer, $timeout, $token, $photo, $version, $optionsNotif = [], $critical = false, $Iq = null, $specific = false, $silent = false) { log::add('mobile', 'debug', '||┌──:fg-success: jsonPublish :/fg:──'); - log::add('mobile', 'debug', '||┌──:fg-success: PARAMS :/fg:──' . $silent); + if ($silent) log::add('mobile', 'debug', '||| Silent notification'); if (isset($Iq)) log::add('mobile', 'debug', '||| IQ for jsonPublish > ' . $Iq); $dateNotif = date("Y-m-d H:i:s"); @@ -1027,7 +1027,7 @@ public static function getNotificationsV2($Iq) } return $return; } - + /** * remove notification from Id into filepath id * Call by ajax removeNotificationV2 @@ -1504,86 +1504,131 @@ public function cmdForSpecificChannel($params = array(), $_trigger = 'location') if (isset($params['Iq'])) { if (isset($params[$_trigger])) { $order = count($this->getCmd()); + $getDeviceInformations = (isset($params[$_trigger]['extras']) && isset($params[$_trigger]['extras']['method']) && $params[$_trigger]['extras']['method'] == 'getDeviceInformations'); // Battery if (isset($params[$_trigger]['battery'])) { // level if (isset($params[$_trigger]['battery']['level'])) { - $cmd = $this->getCmd(null, 'phoneBattery'); - if (!is_object($cmd)) { - $cmd = new mobileCmd(); - $cmd->setLogicalId('phoneBattery'); - $cmd->setName(__('Batterie du téléphone', __FILE__)); - $cmd->setDisplay('icon', ''); - $cmd->setDisplay('showIconAndNamedashboard', 1); - $cmd->setDisplay('showIconAndNamemobile', 1); - $cmd->setDisplay('forceReturnLineAfter', 1); - $cmd->setConfiguration('historizeRound', 2); - $cmd->setConfiguration('minValue', 0); - $cmd->setConfiguration('maxValue', 100); - $cmd->setUnite('%'); - $cmd->setIsVisible(0); - $cmd->setOrder($order); - $order++; - log::add('mobile', 'debug', 'Creation commande Batterie du téléphone'); + if ($getDeviceInformations) { + $cmd = $this->getCmd(null, 'phoneBattery'); + if (!is_object($cmd)) { + $cmd = new mobileCmd(); + $cmd->setLogicalId('phoneBattery'); + $cmd->setName(__('Batterie du téléphone', __FILE__)); + $cmd->setDisplay('icon', ''); + $cmd->setDisplay('showIconAndNamedashboard', 1); + $cmd->setDisplay('showIconAndNamemobile', 1); + $cmd->setDisplay('forceReturnLineAfter', 1); + $cmd->setConfiguration('historizeRound', 2); + $cmd->setConfiguration('minValue', 0); + $cmd->setConfiguration('maxValue', 100); + $cmd->setUnite('%'); + $cmd->setIsVisible(0); + $cmd->setOrder($order); + $order++; + log::add('mobile', 'debug', '| Création de la commande Batterie du téléphone'); //PR + } + $cmd->setEqLogic_id($this->getId()); + $cmd->setType('info'); + $cmd->setConfiguration('calculValueOffset', '#value# * 100'); + $cmd->setSubType('numeric'); + if ($cmd->getChanged() === true) $cmd->save(); + } + if ($params[$_trigger]['battery']['level'] != -1) { + if ($this->checkAndUpdateCmd('phoneBattery', $params[$_trigger]['battery']['level'])) { + log::add('mobile', 'debug', '| ' . (__('Batterie du téléphone', __FILE__)) . ' = ' . $params[$_trigger]['battery']['level'] * 100 . '%'); + } + } else { + log::add('mobile', 'debug', '| ' . (__('Batterie du téléphone', __FILE__)) . ' : ' . 'Absence de donnée ─▶︎ ' . $params[$_trigger]['battery']['level']); } - $cmd->setEqLogic_id($this->getId()); - $cmd->setType('info'); - $cmd->setSubType('numeric'); - if ($cmd->getChanged() === true) $cmd->save(); - log::add('mobile', 'debug', '| OK phoneBattery = ' . $params[$_trigger]['battery']['level'] * 100); - $this->checkAndUpdateCmd('phoneBattery', $params[$_trigger]['battery']['level'] * 100); } // charging if (isset($params[$_trigger]['battery']['is_charging'])) { - $cmd = $this->getCmd(null, 'phoneCharging'); - if (!is_object($cmd)) { - $cmd = new mobileCmd(); - $cmd->setLogicalId('phoneCharging'); - $cmd->setName(__('En charge', __FILE__)); - $cmd->setDisplay('icon', ''); - $cmd->setDisplay('showIconAndNamedashboard', 1); - $cmd->setDisplay('showIconAndNamemobile', 1); - $cmd->setDisplay('forceReturnLineAfter', 1); - $cmd->setTemplate('dashboard', 'core::line'); - $cmd->setTemplate('mobile', 'core::line'); - $cmd->setIsVisible(0); - $cmd->setOrder($order); - $order++; - log::add('mobile', 'debug', 'Creation commande En charge'); + if ($getDeviceInformations) { + $cmd = $this->getCmd(null, 'phoneCharging'); + if (!is_object($cmd)) { + $cmd = new mobileCmd(); + $cmd->setLogicalId('phoneCharging'); + $cmd->setName(__('En charge', __FILE__)); + $cmd->setDisplay('icon', ''); + $cmd->setDisplay('showIconAndNamedashboard', 1); + $cmd->setDisplay('showIconAndNamemobile', 1); + $cmd->setDisplay('forceReturnLineAfter', 1); + $cmd->setTemplate('dashboard', 'core::line'); + $cmd->setTemplate('mobile', 'core::line'); + $cmd->setIsVisible(0); + $cmd->setOrder($order); + $order++; + log::add('mobile', 'debug', '| ' . __('Création de la commande', __FILE__) . ' > ' . __('En charge', __FILE__)); //PR + } + $cmd->setEqLogic_id($this->getId()); + $cmd->setType('info'); + $cmd->setSubType('binary'); + if ($cmd->getChanged() === true) $cmd->save(); + } + if ($this->checkAndUpdateCmd('phoneCharging', intval($params[$_trigger]['battery']['is_charging']))) { + log::add('mobile', 'debug', '| ' . (__('En charge', __FILE__)) . ' = ' . intval($params[$_trigger]['battery']['is_charging'])); } - $cmd->setEqLogic_id($this->getId()); - $cmd->setType('info'); - $cmd->setSubType('binary'); - if ($cmd->getChanged() === true) $cmd->save(); - log::add('mobile', 'debug', '| OK phoneCharging = ' . intval($params[$_trigger]['battery']['is_charging'])); - $this->checkAndUpdateCmd('phoneCharging', intval($params[$_trigger]['battery']['is_charging'])); } } // coords if (isset($params[$_trigger]['coords'])) { if (isset($params[$_trigger]['coords']['latitude']) && isset($params[$_trigger]['coords']['longitude'])) { - $cmd = $this->getCmd(null, 'coords'); - if (!is_object($cmd)) { - $cmd = new mobileCmd(); - $cmd->setLogicalId('coords'); - $cmd->setName(__('Coordonnées', __FILE__)); - $cmd->setDisplay('icon', ''); - $cmd->setDisplay('showIconAndNamedashboard', 1); - $cmd->setDisplay('showIconAndNamemobile', 1); - $cmd->setDisplay('forceReturnLineAfter', 1); - $cmd->setTemplate('dashboard', 'core::line'); - $cmd->setTemplate('mobile', 'core::line'); - $cmd->setIsVisible(0); - $cmd->setOrder($order); - $order++; - log::add('mobile', 'debug', 'Create cmd for coords'); + if ($getDeviceInformations) { + $cmd = $this->getCmd(null, 'coords'); + if (!is_object($cmd)) { + $cmd = new mobileCmd(); + $cmd->setLogicalId('coords'); + $cmd->setName(__('Coordonnées', __FILE__)); + $cmd->setDisplay('icon', ''); + $cmd->setDisplay('showIconAndNamedashboard', 1); + $cmd->setDisplay('showIconAndNamemobile', 1); + $cmd->setDisplay('forceReturnLineAfter', 1); + $cmd->setTemplate('dashboard', 'core::line'); + $cmd->setTemplate('mobile', 'core::line'); + $cmd->setIsVisible(0); + $cmd->setOrder($order); + $order++; + log::add('mobile', 'debug', '| ' . __('Création de la commande', __FILE__) . ' > ' . __('Coordonnées', __FILE__)); //PR + } + $cmd->setEqLogic_id($this->getId()); + $cmd->setType('info'); + $cmd->setSubType('string'); + if ($cmd->getChanged() === true) $cmd->save(); + } + $coord = $params[$_trigger]['coords']['latitude'] . ',' . $params[$_trigger]['coords']['longitude']; + if ($this->checkAndUpdateCmd('coords', $coord)) { + log::add('mobile', 'debug', '| ' . (__('Coordonnées', __FILE__)) . ' = ' . $coord); + } + + } + if (isset($params[$_trigger]['coords']['altitude'])) { + if ($getDeviceInformations) { + $cmd = $this->getCmd(null, 'altitude'); + if (!is_object($cmd)) { + $cmd = new mobileCmd(); + $cmd->setLogicalId('altitude'); + $cmd->setName(__('Altitude', __FILE__)); + $cmd->setDisplay('icon', ''); + $cmd->setDisplay('showIconAndNamedashboard', 1); + $cmd->setDisplay('showIconAndNamemobile', 1); + $cmd->setDisplay('forceReturnLineAfter', 1); + $cmd->setTemplate('dashboard', 'core::line'); + $cmd->setTemplate('mobile', 'core::line'); + $cmd->setIsVisible(0); + $cmd->setUnite('m'); + $cmd->setOrder($order); + $order++; + log::add('mobile', 'debug', '| ' . __('Création de la commande', __FILE__) . ' > ' . __('Altitude', __FILE__)); //PR + } + $cmd->setEqLogic_id($this->getId()); + $cmd->setType('info'); + $cmd->setSubType('string'); + if ($cmd->getChanged() === true) $cmd->save(); + } + if ($this->checkAndUpdateCmd('altitude', $params[$_trigger]['coords']['altitude'])) { + log::add('mobile', 'debug', '| ' . (__('Altitude', __FILE__)) . ' = ' . $params[$_trigger]['coords']['altitude'] . 'm'); } - $cmd->setEqLogic_id($this->getId()); - $cmd->setType('info'); - $cmd->setSubType('string'); - if ($cmd->getChanged() === true) $cmd->save(); - log::add('mobile', 'debug', '| OK coords = ' . $params[$_trigger]['coords']['latitude'] . ',' . $params[$_trigger]['coords']['longitude']); - $this->checkAndUpdateCmd('coords', $params[$_trigger]['coords']['latitude'] . ',' . $params[$_trigger]['coords']['longitude']); } } } @@ -1598,7 +1643,7 @@ public function cleaningNotifications() { $notifsTime = $this->getConfiguration('notifsTime', 30); log::add('mobile', 'debug', '┌──────────▶︎ :fg-warning: Nettoyage des Notifications et Images :/fg: ──────────'); - log::add('mobile', 'debug', '| Durée de retention actuelle : ' . $notifsTime . ' jours'); + log::add('mobile', 'debug', '| Durée de rétention actuelle : ' . $notifsTime . ' jours'); // Images $retentionSeconds = intVal($notifsTime) * 24 * 60 * 60; $currentTime = time(); @@ -1610,7 +1655,7 @@ public function cleaningNotifications() $fileCreationTime = filemtime($image); if ($fileCreationTime < ($currentTime - $retentionSeconds)) { if (!unlink($image)) { - log::add('mobile', 'error', 'Erreur lors de la suppression de: ' . $image); + log::add('mobile', 'error', 'Erreur lors de la suppression de : ' . $image); } else { log::add('mobile', 'debug', '| ─▶︎ :fg-danger:suppression image:/fg: > ' . $image); } @@ -1885,7 +1930,7 @@ public function execute($_options = array()) switch ($valueUser) { case 1: file_put_contents($filePath, ''); - log::add('mobile', 'info', '| Suppression des notifications effectuée'); + log::add('mobile', 'info', '| Suppression des notifications réalisée'); break; case 2: $notifs = json_decode(file_get_contents($filePath), true); @@ -1897,7 +1942,7 @@ public function execute($_options = array()) return $notif['data']['askVariable'] == 'rien' || ($currentTime - $notifTime) < $timeout; }); file_put_contents($filePath, json_encode($notifs)); - log::add('mobile', 'info', '| Suppression des asks expirés effectuée'); + log::add('mobile', 'info', '| Suppression des asks expirés réalisée'); break; case 3: $notifs = json_decode(file_get_contents($filePath), true); @@ -1905,7 +1950,7 @@ public function execute($_options = array()) return !isset($notif['data']['choiceAsk']) || $notif['data']['choiceAsk'] == ''; }); file_put_contents($filePath, json_encode($notifs)); - log::add('mobile', 'info', '| Suppression des asks répondus effectuée'); + log::add('mobile', 'info', '| Suppression des asks répondus réalisée'); break; } From 86e90f8921048d73d80fd5a95413fc126b01f043 Mon Sep 17 00:00:00 2001 From: David <79108364+Phpvarious@users.noreply.github.com> Date: Thu, 14 May 2026 14:30:08 +0200 Subject: [PATCH 2/9] Update mobile.api.php --- core/api/mobile.api.php | 93 +++++++++++++++++++++-------------------- 1 file changed, 48 insertions(+), 45 deletions(-) diff --git a/core/api/mobile.api.php b/core/api/mobile.api.php index 1a2f6076..e1834be3 100755 --- a/core/api/mobile.api.php +++ b/core/api/mobile.api.php @@ -517,57 +517,60 @@ function saveMenuFromAppV2($menu, $mobile) log::add('mobile', 'debug', '┌─────▶︎ GeoLocV2 geofencing ───────────────'); $mobile = eqLogic::byLogicalId($params['Iq'], 'mobile'); if (is_object($mobile)) { - if (isset($params['transmition']) && isset($params['transmition']['extras']) && isset($params['transmition']['extras']['method'])) { - if ($params['transmition']['extras']['method'] == 'getDeviceInformations') { - log::add('mobile', 'debug', '| ───:fg-success: methodeForSpecificChannel in Background :/fg: ───'); - $mobile->cmdForSpecificChannel($params, 'transmition'); - } - } else if (isset($params['transmition']) && isset($params['transmition']['event']) && $params['transmition']['event'] == 'geofence') { - log::add('mobile', 'debug', '| Event > ' . $params['transmition']['event']); - $geofence = $params['transmition']['geofence']; - log::add('mobile', 'debug', '| Event > ' . json_encode($geofence)); - log::add('mobile', 'debug', '| OK Mobile trouvé -> ' . $mobile->getName() . ' (' . $params['Iq'] . ')'); - $cmdgeoloc = cmd::byEqLogicIdAndLogicalId($mobile->getId(), 'geoloc_' . $geofence['identifier']); - if (is_object($cmdgeoloc)) { - if ($geofence['action'] == 'ENTER') { - log::add('mobile', 'debug', '| OK Commande "' . $cmdgeoloc->getName() . '" passée à 1'); - $cmdgeoloc->event(1); - } else if ($geofence['action'] == 'EXIT') { - log::add('mobile', 'debug', '| OK Commande "' . $cmdgeoloc->getName() . '" passée à 0'); - $cmdgeoloc->event(0); - } else { - log::add('mobile', 'debug', '| Event -> ' . $geofence['action']); + log::add('mobile', 'debug', '| OK Mobile trouvé -> ' . $mobile->getName() . ' (' . $params['Iq'] . ')'); + if (isset($params['transmition'])) { + $mobile->cmdForSpecificChannel($params, 'transmition'); + if (isset($params['transmition']['event']) && $params['transmition']['event'] == 'geofence') { + log::add('mobile', 'debug', '| Event > ' . $params['transmition']['event']); + $geofence = $params['transmition']['geofence']; + log::add('mobile', 'debug', '| Event > ' . json_encode($geofence)); + $cmdgeoloc = cmd::byEqLogicIdAndLogicalId($mobile->getId(), 'geoloc_' . $geofence['identifier']); + if (is_object($cmdgeoloc)) { + if ($geofence['action'] == 'ENTER' || $geofence['action'] == 'EXIT') { + $eventAge = time() - intval(strtotime($geofence['timestamp'])); + if ($eventAge > 1800) { + log::add('mobile', 'debug', '| SKIP stale event (' . round($eventAge / 60) . 'min) ' . $geofence['action'] . ' geoloc_' . $geofence['identifier']); + } else { + $value = ($geofence['action'] == 'ENTER') ? 1 : 0; + log::add('mobile', 'debug', '| OK Commande "' . $cmdgeoloc->getName() . '" -> ' . $value); + $mobile->checkAndUpdateCmd('geoloc_' . $geofence['identifier'], $value); + } + } else { + log::add('mobile', 'debug', '| Event -> ' . $geofence['action']); + } } - } - } else { - $transmitions = $params['transmition']; - $errorCount = 0; - foreach ($transmitions as $transmition) { - if (isset($transmition['event']) && $transmition['event'] == 'geofence') { - log::add('mobile', 'debug', '| Transmition :' . json_encode($params['transmition'])); - $geofence = $transmition['geofence']; - log::add('mobile', 'debug', '| Event > ' . json_encode($geofence)); - log::add('mobile', 'debug', '| OK Mobile trouvé -> ' . $mobile->getName() . ' (' . $params['Iq'] . ')'); - $cmdgeoloc = cmd::byEqLogicIdAndLogicalId($mobile->getId(), 'geoloc_' . $geofence['identifier']); - if (is_object($cmdgeoloc)) { - if ($geofence['action'] == 'ENTER') { - log::add('mobile', 'debug', '| OK Commande "' . $cmdgeoloc->getName() . '" passée à 1'); - $cmdgeoloc->event(1); - } else if ($geofence['action'] == 'EXIT') { - log::add('mobile', 'debug', '| OK Commande "' . $cmdgeoloc->getName() . '" passée à 0'); - $cmdgeoloc->event(0); + } else { + $transmitions = $params['transmition']; + $errorCount = 0; + foreach ($transmitions as $transmition) { + if (isset($transmition['event']) && $transmition['event'] == 'geofence') { + log::add('mobile', 'debug', '| Transmition :' . json_encode($params['transmition'])); + $geofence = $transmition['geofence']; + log::add('mobile', 'debug', '| Event > ' . json_encode($geofence)); + $cmdgeoloc = cmd::byEqLogicIdAndLogicalId($mobile->getId(), 'geoloc_' . $geofence['identifier']); + if (is_object($cmdgeoloc)) {if ($geofence['action'] == 'ENTER' || $geofence['action'] == 'EXIT') { + $eventAge = time() - intval(strtotime($geofence['timestamp'])); + log::add('mobile', 'debug', '| $eventAge > ' . $eventAge); + if ($eventAge > 1800) { + log::add('mobile', 'debug', '| SKIP stale event (' . round($eventAge / 60) . 'min) ' . $geofence['action'] . ' geoloc_' . $geofence['identifier']); + } else { + $value = ($geofence['action'] == 'ENTER') ? 1 : 0; + log::add('mobile', 'debug', '| OK Commande "' . $cmdgeoloc->getName() . '" -> ' . $value); + $mobile->checkAndUpdateCmd('geoloc_' . $geofence['identifier'], $value); + } + } else { + log::add('mobile', 'debug', '| [INFO] Event -> ' . $geofence['action']); + } } else { - log::add('mobile', 'debug', '| [INFO] Event -> ' . $geofence['action']); + log::add('mobile', 'debug', '| [ERROR] Commande geoloc_' . $geofence['identifier'] . ' inexistante.'); } } else { - log::add('mobile', 'debug', '| [ERROR] Commande geoloc_' . $geofence['identifier'] . ' inexistante.'); + $errorCount++; } - } else { - $errorCount++; } - } - if ($errorCount > 0) { - log::add('mobile', 'debug', __('| Pas de paramètre de geofencing', __FILE__)); + if ($errorCount > 0) { + log::add('mobile', 'debug', __('| Pas de paramètre de geofencing', __FILE__)); + } } } } else { From e33f7bc177bd45ab9cab34ca76cfdda23fa464bf Mon Sep 17 00:00:00 2001 From: David <79108364+Phpvarious@users.noreply.github.com> Date: Fri, 15 May 2026 00:29:57 +0200 Subject: [PATCH 3/9] Update mobile.ajax.php PR Jag --- core/ajax/mobile.ajax.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/ajax/mobile.ajax.php b/core/ajax/mobile.ajax.php index 378aca98..535bbbfb 100755 --- a/core/ajax/mobile.ajax.php +++ b/core/ajax/mobile.ajax.php @@ -59,7 +59,7 @@ } ajax::success($return); } - + if (init('action') == 'getNotificationsV2') { $return = ''; $iq = init('iq'); @@ -71,8 +71,8 @@ } if (init('action') == 'removeNotificationV2') { - ajax::success(mobile::removeNotificationV2(init('iq', ''), init('id', ''))); - } + ajax::success(mobile::removeNotificationV2(init('iq', ''), init('id', ''))); + } // APP V1 From 8cfd444a19cb7b18d7e4d613b3aaea938b165f3a Mon Sep 17 00:00:00 2001 From: David <79108364+Phpvarious@users.noreply.github.com> Date: Fri, 15 May 2026 00:32:43 +0200 Subject: [PATCH 4/9] Update mobile.api.php PR Jag --- core/api/mobile.api.php | 128 ++++++++++++++++++++-------------------- 1 file changed, 64 insertions(+), 64 deletions(-) diff --git a/core/api/mobile.api.php b/core/api/mobile.api.php index e1834be3..169f93d0 100755 --- a/core/api/mobile.api.php +++ b/core/api/mobile.api.php @@ -26,17 +26,17 @@ } $params = $jsonrpc->getParams(); -log::add('mobile', 'debug', '┌──────────▶︎ :fg-warning: Appel API Mobile :/fg: ◀︎───────────'); -log::add('mobile', 'debug', '| Method > ' . $jsonrpc->getMethod()); +log::add('mobile', 'debug', '┌──────────▶︎ :fg-warning:Appel API Mobile:/fg: ◀︎─────────────'); +log::add('mobile', 'debug', '| Method ─▶︎ ' . $jsonrpc->getMethod()); $secureApikeyLog = $params; if (isset($secureApikeyLog['apikey'])) $secureApikeyLog['apikey'] = substr($secureApikeyLog['apikey'], 0, 10) . '...'; -log::add('mobile', 'debug', '| Paramètres passés > ' . json_encode($secureApikeyLog)); +log::add('mobile', 'debug', '| Paramètres passés ─▶︎ ' . json_encode($secureApikeyLog)); if ($params['Iq']) { if (mobile::whoIsIq($params['Iq']) == 'mobile non detecte') { //createMobile($params, 3); log::add('mobile', 'debug', '| [WARNING] mobile non detecté !'); } else { - log::add('mobile', 'debug', '| Mobile demandeur ' . mobile::whoIsIq($params['Iq'])); + log::add('mobile', 'debug', '| Mobile demandeur : ' . mobile::whoIsIq($params['Iq'])); } } else { log::add('mobile', 'debug', '| [WARNING] Paramètre Iq inexistant !'); @@ -123,14 +123,14 @@ function saveMenuFromAppV2($menu, $mobile) * @return string ok makeSuccess */ if ($jsonrpc->getMethod() == 'setConfigs') { - log::add('mobile', 'debug', '┌─────▶︎ AppV2 setConfigs ─────────────────'); + log::add('mobile', 'debug', '┌──────────▶︎ AppV2 setConfigs ──────────────'); $configs = $params['configs']; $geolocs = $params['geolocs']; $menu = $configs['menu']; $notification = $configs['notification']; - log::add('mobile', 'debug', '| [INFO] Configs > ' . json_encode($configs)); - log::add('mobile', 'debug', '| [INFO] Geolocs > ' . json_encode($geolocs)); - //log::add('mobile', 'debug', '| [INFO] Menu > ' . json_encode($menu)); + log::add('mobile', 'debug', '| [INFO] Configs ─▶︎ ' . json_encode($configs)); + log::add('mobile', 'debug', '| [INFO] Geolocs ─▶︎ ' . json_encode($geolocs)); + //log::add('mobile', 'debug', '| [INFO] Menu ─▶︎ ' . json_encode($menu)); log::add('mobile', 'debug', '| [INFO] Notification ─▶︎ ' . json_encode($notification)); $mobile = null; if (isset($params['Iq'])) { @@ -192,7 +192,7 @@ function saveMenuFromAppV2($menu, $mobile) * @return string ok makeSuccess */ if ($jsonrpc->getMethod() == 'setCustomMenu') { - log::add('mobile', 'debug', '┌─────▶︎ AppV2 setCustomMenu ─────────────────'); + log::add('mobile', 'debug', '┌──────────▶︎ AppV2 setCustomMenu ───────────'); $configs = $params['configs']; $menu = $configs['menu']; log::add('mobile', 'debug', '| [INFO] Configs ─▶︎ ' . json_encode($configs)); @@ -214,7 +214,7 @@ function saveMenuFromAppV2($menu, $mobile) * @return array makeSuccess */ if ($jsonrpc->getMethod() == 'getPlugins') { - log::add('mobile', 'debug', '┌─────◀︎ AppV2 getPlugins Infos ────────────────────'); + log::add('mobile', 'debug', '┌──────────◀︎ AppV2 getPlugins Infos ────────'); $idBox = jeedom::getHardwareKey(); $return = []; $arrayPlugins = []; @@ -267,7 +267,7 @@ function saveMenuFromAppV2($menu, $mobile) */ if ($jsonrpc->getMethod() == 'getJson') { - log::add('mobile', 'debug', '┌─────◀︎ AppV2 getJson ────────────────────'); + log::add('mobile', 'debug', '┌──────────◀︎ AppV2 getJson ──────────────────'); $registerDevice = $_USER_GLOBAL->getOptions('registerDevice', array()); if (!is_array($registerDevice)) { $registerDevice = array(); @@ -342,7 +342,7 @@ function saveMenuFromAppV2($menu, $mobile) $return[$idBox]['configs'] = array(); $return[$idBox]['miscellanousParams'] = array(); if (is_object($mobile)) { - log::add('mobile', 'debug', '| OK Mobile trouvé > ' . $mobile->getName()); + log::add('mobile', 'debug', '| OK Mobile trouvé ─▶︎ ' . $mobile->getName()); $return[$idBox]['configs']['menu'] = $mobile->configMenuCustom(); $return[$idBox]['miscellanousParams']['hideMenuCustom'] = intval($mobile->getConfiguration('hideMenuCustom', 0)); $return[$idBox]['miscellanousParams']['hideMenuGeoloc'] = intval($mobile->getConfiguration('hideMenuGeoloc', 0)); @@ -353,8 +353,8 @@ function saveMenuFromAppV2($menu, $mobile) $return[$idBox]['miscellanousParams']['hideMenuGeoloc'] = 0; $return[$idBox]['miscellanousParams']['sendNFCDirectly'] = 1; } - log::add('mobile', 'debug', '| [INFO] CustomENVOICONFIGSAPI GETJSON > ' . json_encode($return[$idBox]['configs'])); - log::add('mobile', 'debug', '| [INFO] Retour vers App > ' . json_encode($return)); + log::add('mobile', 'debug', '| [INFO] CustomENVOICONFIGSAPI GETJSON ─▶︎ ' . json_encode($return[$idBox]['configs'])); + log::add('mobile', 'debug', '| [INFO] Retour vers APP ─▶︎ ' . json_encode($return)); log::add('mobile', 'debug', '└───────────────────────────────────────────'); $jsonrpc->makeSuccess($return); @@ -366,8 +366,8 @@ function saveMenuFromAppV2($menu, $mobile) * @return array makeSuccess */ if ($jsonrpc->getMethod() == 'getCustomMenu') { - log::add('mobile', 'debug', '┌─────◀︎ AppV2 getCustomMenu ────────────────────'); - log::add('mobile', 'debug', '| Recherche du mobile via sont Iq ─▶︎ ' . $params['Iq']); + log::add('mobile', 'debug', '┌──────────◀︎ AppV2 getCustomMenu ───────────'); + log::add('mobile', 'debug', '| Recherche du mobile via sont Iq > ' . $params['Iq']); $mobile = eqLogic::byLogicalId($params['Iq'], 'mobile'); if (is_object($mobile)) { log::add('mobile', 'debug', '| OK Mobile trouvé ─▶︎ ' . $mobile->getName()); @@ -450,7 +450,7 @@ function saveMenuFromAppV2($menu, $mobile) * @return makeSuccess */ if ($jsonrpc->getMethod() == 'askText') { - log::add('mobile', 'debug', '┌─────▶︎ ASK ───────────────────────────────'); + log::add('mobile', 'debug', '┌──────────▶︎ ASK ───────────────────────────'); /*$configs = $params['configs']; $menu = $configs['menu']; $notification = $configs['notification'];*/ @@ -486,12 +486,12 @@ function saveMenuFromAppV2($menu, $mobile) * @return string ok */ if ($jsonrpc->getMethod() == 'getAskResponse') { - log::add('mobile', 'debug', '┌────▶︎ getAskResponse ────────────────────'); + log::add('mobile', 'debug', '┌──────────▶︎ getAskResponse ────────────────'); $Iq = $params['Iq']; $filePath = dirname(__FILE__) . '/../data/notifications/' . $Iq . '.json'; $idNotif = $params['idNotif']; $choiceAsk = $params['choiceAsk']; - log::add('mobile', 'debug', '| Réponse ASK ─▶︎ ' . $Iq . ' > ' . $idNotif . ' > ' . $choiceAsk); + log::add('mobile', 'debug', '| Réponse ASK ─▶︎ ' . $Iq . ' > ' . $idNotif . ' ─▶︎ ' . $choiceAsk); if (file_exists($filePath)) { $notifications = file_get_contents($filePath); $notificationsArray = json_decode($notifications, true); @@ -514,16 +514,16 @@ function saveMenuFromAppV2($menu, $mobile) * @return makeSuccess */ if ($jsonrpc->getMethod() == 'mobile::geoloc') { - log::add('mobile', 'debug', '┌─────▶︎ GeoLocV2 geofencing ───────────────'); + log::add('mobile', 'debug', '┌──────────▶︎ GeoLocV2 geofencing ───────────'); $mobile = eqLogic::byLogicalId($params['Iq'], 'mobile'); if (is_object($mobile)) { - log::add('mobile', 'debug', '| OK Mobile trouvé -> ' . $mobile->getName() . ' (' . $params['Iq'] . ')'); + log::add('mobile', 'debug', '| OK Mobile trouvé ─▶︎ ' . $mobile->getName() . ' (' . $params['Iq'] . ')'); if (isset($params['transmition'])) { $mobile->cmdForSpecificChannel($params, 'transmition'); if (isset($params['transmition']['event']) && $params['transmition']['event'] == 'geofence') { - log::add('mobile', 'debug', '| Event > ' . $params['transmition']['event']); + log::add('mobile', 'debug', '| Event ─▶︎ ' . $params['transmition']['event']); $geofence = $params['transmition']['geofence']; - log::add('mobile', 'debug', '| Event > ' . json_encode($geofence)); + log::add('mobile', 'debug', '| Event ─▶︎ ' . json_encode($geofence)); $cmdgeoloc = cmd::byEqLogicIdAndLogicalId($mobile->getId(), 'geoloc_' . $geofence['identifier']); if (is_object($cmdgeoloc)) { if ($geofence['action'] == 'ENTER' || $geofence['action'] == 'EXIT') { @@ -536,7 +536,7 @@ function saveMenuFromAppV2($menu, $mobile) $mobile->checkAndUpdateCmd('geoloc_' . $geofence['identifier'], $value); } } else { - log::add('mobile', 'debug', '| Event -> ' . $geofence['action']); + log::add('mobile', 'debug', '| Event ─▶︎ ' . $geofence['action']); } } } else { @@ -544,22 +544,22 @@ function saveMenuFromAppV2($menu, $mobile) $errorCount = 0; foreach ($transmitions as $transmition) { if (isset($transmition['event']) && $transmition['event'] == 'geofence') { - log::add('mobile', 'debug', '| Transmition :' . json_encode($params['transmition'])); + log::add('mobile', 'debug', '| Transmition : ' . json_encode($params['transmition'])); $geofence = $transmition['geofence']; - log::add('mobile', 'debug', '| Event > ' . json_encode($geofence)); + log::add('mobile', 'debug', '| Event ─▶︎ ' . json_encode($geofence)); $cmdgeoloc = cmd::byEqLogicIdAndLogicalId($mobile->getId(), 'geoloc_' . $geofence['identifier']); if (is_object($cmdgeoloc)) {if ($geofence['action'] == 'ENTER' || $geofence['action'] == 'EXIT') { $eventAge = time() - intval(strtotime($geofence['timestamp'])); - log::add('mobile', 'debug', '| $eventAge > ' . $eventAge); + log::add('mobile', 'debug', '| $eventAge ─▶︎ ' . $eventAge); if ($eventAge > 1800) { log::add('mobile', 'debug', '| SKIP stale event (' . round($eventAge / 60) . 'min) ' . $geofence['action'] . ' geoloc_' . $geofence['identifier']); } else { $value = ($geofence['action'] == 'ENTER') ? 1 : 0; - log::add('mobile', 'debug', '| OK Commande "' . $cmdgeoloc->getName() . '" -> ' . $value); + log::add('mobile', 'debug', '| OK Commande "' . $cmdgeoloc->getName() . '" ─▶︎ ' . $value); $mobile->checkAndUpdateCmd('geoloc_' . $geofence['identifier'], $value); } } else { - log::add('mobile', 'debug', '| [INFO] Event -> ' . $geofence['action']); + log::add('mobile', 'debug', '| [INFO] Event ─▶︎ ' . $geofence['action']); } } else { log::add('mobile', 'debug', '| [ERROR] Commande geoloc_' . $geofence['identifier'] . ' inexistante.'); @@ -587,7 +587,7 @@ function saveMenuFromAppV2($menu, $mobile) * @return makeSuccess */ if ($jsonrpc->getMethod() == "qrcodemethod") { - log::add('mobile', 'debug', '┌─────▶︎ qrcodemethod ──────────────────────'); + log::add('mobile', 'debug', '┌──────────▶︎ qrcodemethod ──────────────────'); if ($params['appInfos']) { log::add('mobile', 'debug', '| [INFO] Valeur du QrCode > ' . json_encode($params['appInfos']['qrCode'])); if (isset($params['appInfos']['qrCode']['displayValue'])) { @@ -595,8 +595,8 @@ function saveMenuFromAppV2($menu, $mobile) } else { mobile::cmdForApi($params['Iq'], "qrcodemethod", json_encode($params['appInfos']['qrCode']), "QrCode"); } - log::add('mobile', 'debug', '└───────────────────────────────────────────'); } + log::add('mobile', 'debug', '└───────────────────────────────────────────'); $jsonrpc->makeSuccess(); } @@ -606,8 +606,8 @@ function saveMenuFromAppV2($menu, $mobile) * @return makeSuccess || makeError */ if ($jsonrpc->getMethod() == "methodeForSpecificChannel") { - log::add('mobile', 'debug', '┌─────▶︎ methodeForSpecificChannel ──────────────────────'); - log::add('mobile', 'debug', '| [INFO] params > ' . json_encode($params)); + log::add('mobile', 'debug', '┌──────────▶︎ methodeForSpecificChannel ──────────────────────'); + log::add('mobile', 'debug', '| [INFO] params ─▶︎ ' . json_encode($params)); $mobile = eqLogic::byLogicalId($params['Iq'], 'mobile'); if (is_object($mobile)) { $mobile->cmdForSpecificChannel($params, 'location'); @@ -620,7 +620,7 @@ function saveMenuFromAppV2($menu, $mobile) $jsonrpc->makeError('Paramètre Iq inexistant'); } } - log::add('mobile', 'debug', '└───────────────────────────────────────────'); + log::add('mobile', 'debug', '└─────────────────────────────────────────────────────────────'); $jsonrpc->makeSuccess(); } @@ -630,13 +630,13 @@ function saveMenuFromAppV2($menu, $mobile) * @return makeSuccess */ if ($jsonrpc->getMethod() == "nfc") { - log::add('mobile', 'debug', '┌─────▶︎ nfc ───────────────────────────────'); + log::add('mobile', 'debug', '┌──────────▶︎ NFC ───────────────────────────'); $id = (isset($params['appInfos']['payload']['id'])) ? $params['appInfos']['payload']['id'] : ""; $payload = (isset($params['appInfos']['payload']['payload'])) ? $params['appInfos']['payload']['payload'] : ""; mobile::cmdForApi($params['Iq'], "nfcId", $id, "Nfc Id"); mobile::cmdForApi($params['Iq'], "nfcPayload", json_encode($payload), "Nfc Payload"); - log::add('mobile', 'debug', '| [INFO] Id > ' . $id); - log::add('mobile', 'debug', '| [INFO] Payload > ' . $payload); + log::add('mobile', 'debug', '| [INFO] Id ─▶︎ ' . $id); + log::add('mobile', 'debug', '| [INFO] Payload ─▶︎ ' . $payload); log::add('mobile', 'debug', '└───────────────────────────────────────────'); $jsonrpc->makeSuccess(); } @@ -647,8 +647,8 @@ function saveMenuFromAppV2($menu, $mobile) * @return */ if ($jsonrpc->getMethod() == "syncBella") { - log::add('mobile', 'debug', '┌─────▶︎ syncBella ─────────────────────────'); - log::add('mobile', 'debug', '| JeedomApp > syncBella'); + log::add('mobile', 'debug', '┌──────────▶︎ syncBella ─────────────────────'); + log::add('mobile', 'debug', '| JeedomApp ─▶︎ syncBella'); log::add('mobile', 'debug', '└───────────────────────────────────────────'); } @@ -658,7 +658,7 @@ function saveMenuFromAppV2($menu, $mobile) * @return array */ if ($jsonrpc->getMethod() == 'getNotificationsFromFile') { - log::add('mobile', 'debug', '┌──────────▶︎ :fg-warning: Recuperation des Notifications :/fg: ──────────'); + log::add('mobile', 'debug', '┌──────────▶︎ :fg-warning:Recuperation des Notifications:/fg: ──────────'); $Iq = $params['Iq']; $filePath = dirname(__FILE__) . '/../data/notifications/' . $Iq . '.json'; $notifications = 'noNotifications'; @@ -668,8 +668,8 @@ function saveMenuFromAppV2($menu, $mobile) $notifications = 'noNotifications'; } } - log::add('mobile', 'debug', '| [INFO] Notifications > ' . $notifications); - log::add('mobile', 'debug', '└───────────────────────────────────────────'); + log::add('mobile', 'debug', '| [INFO] Notifications ─▶︎ ' . $notifications); + log::add('mobile', 'debug', '└─────────────────────────────────────────────────────'); $jsonrpc->makeSuccess($notifications); } @@ -679,7 +679,7 @@ function saveMenuFromAppV2($menu, $mobile) * @return string ok */ if ($jsonrpc->getMethod() == 'deleteNotificationInJsonFile') { - log::add('mobile', 'debug', '┌────▶︎ deleteNotificationInJsonFile ──────'); + log::add('mobile', 'debug', '┌──────────▶︎ deleteNotificationInJsonFile ──────'); $Iq = $params['Iq']; $filePath = dirname(__FILE__) . '/../data/notifications/' . $Iq . '.json'; $idNotif = $params['IdNotif']; @@ -695,7 +695,7 @@ function saveMenuFromAppV2($menu, $mobile) file_put_contents($filePath, $notifications); } } - log::add('mobile', 'debug', '└───────────────────────────────────────────'); + log::add('mobile', 'debug', '└───────────────────────────────────────────────'); $jsonrpc->makeSuccess('ok'); } @@ -705,7 +705,7 @@ function saveMenuFromAppV2($menu, $mobile) * @return string ok */ if ($jsonrpc->getMethod() == 'deleteGeolocCommand') { - log::add('mobile', 'debug', '┌────▶︎ Commande suppression GeoLoc ───────'); + log::add('mobile', 'debug', '┌──────────▶︎ Commande suppression GeoLoc ───────'); $geolocId = $params['geoloc_id']; $eqLogic = eqLogic::byLogicalId($params['Iq'], 'mobile'); if (is_object($eqLogic)) { @@ -717,7 +717,7 @@ function saveMenuFromAppV2($menu, $mobile) } else { log::add('mobile', 'debug', __('| [ERROR] EqLogic inconnu : ', __FILE__) . $params['Iq']); } - log::add('mobile', 'debug', '└───────────────────────────────────────────'); + log::add('mobile', 'debug', '└───────────────────────────────────────────────'); $jsonrpc->makeSuccess('ok'); } @@ -727,14 +727,14 @@ function saveMenuFromAppV2($menu, $mobile) * @return array */ if ($jsonrpc->getMethod() == 'getScenarios') { - log::add('mobile', 'debug', '┌────◀︎ Get Scénarios ─────────────────────'); + log::add('mobile', 'debug', '┌──────────◀︎ Get Scénarios ─────────────────'); $scenarios = array(); $hasScenario = false; $scenarioListGroup = scenario::listGroup(); $emptyListGroup = false; $emptyNoGroup = false; if (empty($scenarioListGroup)) { - log::add('mobile', 'debug', '| Scénarios > Aucun groupe de scénario'); + log::add('mobile', 'debug', '| Scénarios ─▶︎ Aucun groupe de scénario'); $emptyListGroup = true; } if (is_array($scenarioListGroup)) { @@ -748,15 +748,15 @@ function saveMenuFromAppV2($menu, $mobile) $scenarios['{{Aucun}}'] = $scenarioNoGroup; $hasScenario = true; } else { - log::add('mobile', 'debug', '| Scénarios > Aucun "sans groupe" de scénario'); + log::add('mobile', 'debug', '| Scénarios ─▶︎ Aucun "sans groupe" de scénario'); $emptyNoGroup = true; } - log::add('mobile', 'debug', '| Scénarios > ' . json_encode($scenarios)); + log::add('mobile', 'debug', '| Scénarios ─▶︎ ' . json_encode($scenarios)); $scenarioTemp = array(); foreach ($scenarios as $key => $scenario) { $scenarioTemp[$key][] = utils::o2a($scenario); } - log::add('mobile', 'debug', '| $scenarioTemp > ' . json_encode($scenarioTemp)); + log::add('mobile', 'debug', '| $scenarioTemp ─▶︎ ' . json_encode($scenarioTemp)); if ($emptyListGroup && $emptyNoGroup) { $return = 'noScenarios'; } else { @@ -769,7 +769,7 @@ function saveMenuFromAppV2($menu, $mobile) // APP V1 // if ($jsonrpc->getMethod() == 'sync') { - log::add('mobile', 'debug', '┌─────▶︎ Sync App V1 ───────────────'); + log::add('mobile', 'debug', '┌──────────▶︎ Sync App V1 ───────────────────'); if (jeedom::version() >= '3.2.0') { log::add('mobile', 'debug', '| Demande du RDK'); $registerDevice = $_USER_GLOBAL->getOptions('registerDevice', array()); @@ -783,7 +783,7 @@ function saveMenuFromAppV2($menu, $mobile) $registerDevice[sha512($rdk)]['session_id'] = session_id(); $_USER_GLOBAL->setOptions('registerDevice', $registerDevice); $_USER_GLOBAL->save(); - log::add('mobile', 'debug', '| RDK :' . $rdk); + log::add('mobile', 'debug', '| RDK : ' . $rdk); } $mobile = null; if (isset($params['Iq'])) { @@ -826,13 +826,13 @@ function saveMenuFromAppV2($menu, $mobile) $token = $mobile->getConfiguration('notificationRegistrationToken', 'nok'); $tokenMobile = $params['notificationRegistrationToken']; if ($token == 'nok') { - log::add('mobile', 'debug', '| notificationRegistrationToken null dans la configuration > ' . $token); + log::add('mobile', 'debug', '| notificationRegistrationToken null dans la configuration ─▶︎ ' . $token); $mobile->setConfiguration('notificationRegistrationToken', $tokenMobile); $mobile->save(); } else { log::add('mobile', 'debug', '| Token dans la configuration > ' . $token); if ($token != $tokenMobile) { - log::add('mobile', 'debug', '| Token config != Token mobile > ' . $token . ' != ' . $tokenMobile); + log::add('mobile', 'debug', '| Token config != Token mobile ─▶︎ ' . $token . ' != ' . $tokenMobile); $mobile->setConfiguration('notificationRegistrationToken', $tokenMobile); $mobile->save(); } @@ -851,13 +851,13 @@ function saveMenuFromAppV2($menu, $mobile) if (isset($rdk)) { $return['config']['rdk'] = $rdk; } - log::add('mobile', 'debug', '| Return $discovery_summaryValue > ' . json_encode($return['summaryValue'])); + log::add('mobile', 'debug', '| Return $discovery_summaryValue ─▶︎ ' . json_encode($return['summaryValue'])); log::add('mobile', 'debug', '└───────────────────────────────────────────'); $jsonrpc->makeSuccess($return); } if ($jsonrpc->getMethod() == 'cmdsbyEqlogicID') { - log::add('mobile', 'debug', 'Interogation du module id:' . $params['id'] . ' Pour les cmds'); + log::add('mobile', 'debug', 'Interogation du module id :' . $params['id'] . ' Pour les cmds'); $PluginToSend = mobile::PluginToSend(); $discover_eqLogic = mobile::discovery_eqLogic($PluginToSend); $sync_new = mobile::change_cmdAndeqLogic(mobile::discovery_cmd($PluginToSend, $discover_eqLogic, true), $discover_eqLogic); @@ -873,7 +873,7 @@ function saveMenuFromAppV2($menu, $mobile) } $i++; } - log::add('mobile', 'debug', 'Commande > ' . json_encode($cmdAPI)); + log::add('mobile', 'debug', 'Commande ─▶︎ ' . json_encode($cmdAPI)); $jsonrpc->makeSuccess($cmdAPI); } @@ -896,13 +896,13 @@ function saveMenuFromAppV2($menu, $mobile) } if ($jsonrpc->getMethod() == 'askText') { - log::add('mobile', 'debug', '┌──:fg-success: TESTAPIASK :/fg:──'); + log::add('mobile', 'debug', '┌──────────▶︎ :fg-success:TESTAPIASK:/fg: ────────────────────'); log::add('mobile', 'debug', '| Arrivée reponse ask Textuel depuis le mobile ─▶︎ ' . $params['Iq']); /*$configs = $params['configs']; $menu = $configs['menu']; $notification = $configs['notification'];*/ $mobile = eqLogic::byLogicalId($params['Iq'], 'mobile'); - log::add('mobile', 'debug', 'mobile >' . json_encode($mobile)); + log::add('mobile', 'debug', 'mobile ─▶︎ ' . json_encode($mobile)); if (is_object($mobile)) { $askCasse = config::byKey('askCasse', 'mobile', false); $textCasse = $params['text']; @@ -925,7 +925,7 @@ function saveMenuFromAppV2($menu, $mobile) $jsonrpc->makeSuccess(); } } - log::add('mobile', 'debug', '└────────────────────'); + log::add('mobile', 'debug', '└───────────────────────────────────────────'); } if ($jsonrpc->getMethod() == 'saveMobile') { @@ -936,12 +936,12 @@ function saveMenuFromAppV2($menu, $mobile) } if ($jsonrpc->getMethod() == 'getMobile') { - log::add('mobile', 'debug', ':fg-success: ─────▶︎ Demande de recuperation ::/fg: ' . $params['type'] . ' ─▶︎ ' . $params['Iq'] . '(' . mobile::whoIsIq($params['Iq']) . ') recuperation save du > ' . $params['IqRestore'] . ' (' . mobile::whoIsIq($params['IqRestore']) . ')'); + log::add('mobile', 'debug', ':fg-success: ─────▶︎ Demande de recuperation ::/fg: ' . $params['type'] . ' ─▶︎ ' . $params['Iq'] . '(' . mobile::whoIsIq($params['Iq']) . ') recuperation save du ─▶︎ ' . $params['IqRestore'] . ' (' . mobile::whoIsIq($params['IqRestore']) . ')'); $jsonrpc->makeSuccess(mobile::getSaveJson($params['IqRestore'], $params['type'])); } if ($jsonrpc->getMethod() == 'geoloc') { - log::add('mobile', 'debug', 'Geoloc ' . $params['id'] . ' > ' . $params['name'] . ' > ' . $params['value']); + log::add('mobile', 'debug', 'Geoloc ' . $params['id'] . ' > ' . $params['name'] . ' ─▶︎ ' . $params['value']); mobile::EventGeoloc($params); $jsonrpc->makeSuccess(); } @@ -957,7 +957,7 @@ function saveMenuFromAppV2($menu, $mobile) } if ($jsonrpc->getMethod() == 'geolocDel') { - log::add('mobile', 'debug', 'Geoloc DEL ' . $params['id'] . ' > ' . $params['name']); + log::add('mobile', 'debug', 'Geoloc DEL ' . $params['id'] . ' ─▶︎ ' . $params['name']); mobile::delGeoloc($params); $jsonrpc->makeSuccess(); } From 064be568c97ee24bc663c18acd31c499d3617dce Mon Sep 17 00:00:00 2001 From: David <79108364+Phpvarious@users.noreply.github.com> Date: Fri, 15 May 2026 00:34:53 +0200 Subject: [PATCH 5/9] Update mobile.php PR Jag --- desktop/php/mobile.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/desktop/php/mobile.php b/desktop/php/mobile.php index cf288f8f..36f4bfeb 100755 --- a/desktop/php/mobile.php +++ b/desktop/php/mobile.php @@ -15,17 +15,16 @@ } } $isApi = config::byKey('api::mobile::mode'); -if($isApi == 'whiteip' || $isApi == 'disable'){ +if ($isApi == 'whiteip' || $isApi == 'disable') { message::add('mobile', 'L\'API mobile est désactivée ou en mode whitelist IP'); } $isCoreApi = config::byKey('api::core::mode'); -if($isCoreApi == 'whiteip' || $isCoreApi == 'disable'){ +if ($isCoreApi == 'whiteip' || $isCoreApi == 'disable') { message::add('mobile', 'L\'API core est désactivée ou en mode whitelist IP'); } ?>
-
{{App V2}} @@ -94,7 +93,7 @@ echo '
'; echo '{{Pour ajouter un téléphone, il y a 2 méthodes possible :}}
{{Sur le premier écran de l\'application, il vous est proposé de connecter votre compte market, et ainsi de retrouver toutes les boxs associées à ce compte, ou bien simplement ajouter une box.}}'; echo '
'; - } + } ?>
@@ -125,6 +124,9 @@ {{Mes Téléphones Mobiles}} +
+ {{Attention, l'APP V1 ne sera plus mise à jour}} +
= 0) { // AppV1 @@ -237,13 +239,13 @@
- +
- +