From bd806e7400f97a672acb8dfb3ddd7345ab3ee780 Mon Sep 17 00:00:00 2001 From: "Julien C." Date: Mon, 14 Oct 2024 17:13:15 +0200 Subject: [PATCH] fix removeNotifs --- core/class/mobile.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/class/mobile.class.php b/core/class/mobile.class.php index 839ec158..83024dc8 100755 --- a/core/class/mobile.class.php +++ b/core/class/mobile.class.php @@ -319,7 +319,8 @@ public static function jsonPublish($os, $titre, $message, $type, $idNotif, $answ } } } - + // $publishJson = str_replace(['
', '
'], '', $publishJson); + // $publishJson = json_decode($publishJson, true); $notifications[$idNotif] = $publishJson; log::add('mobile', 'debug', '||| [INFO] Notification enregistrée : ' . json_encode($notifications)); file_put_contents($filePath, json_encode($notifications)); @@ -1018,8 +1019,8 @@ public function execute($_options = array()) if($this->getLogicalId() == 'removeNotifs') { - $Iq = $eqLogic->getId(); - $filePath = dirname(__FILE__) . '/../../data/notifications/' . $Iq . '.json'; + $Iq = $eqLogic->getLogicalId(); + $filePath = dirname(__FILE__) . '/../data/notifications/' . $Iq . '.json'; if (file_exists($filePath)) { file_put_contents($filePath, ''); log::add('mobile', 'info', '| Suppression des notifications effectuée: ');