Skip to content

Commit

Permalink
fix removeNotifs
Browse files Browse the repository at this point in the history
  • Loading branch information
Sekiro-kost committed Oct 14, 2024
1 parent ce96a1e commit bd806e7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/class/mobile.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,8 @@ public static function jsonPublish($os, $titre, $message, $type, $idNotif, $answ
}
}
}

// $publishJson = str_replace(['<br>', '<br />'], '', $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));
Expand Down Expand Up @@ -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: ');
Expand Down

0 comments on commit bd806e7

Please sign in to comment.