From ea4b1e76abd8207039707b9021b849530ea27412 Mon Sep 17 00:00:00 2001 From: Stanislas Date: Fri, 27 Dec 2024 09:10:39 +0100 Subject: [PATCH] Fix(EventLog): Fix SQL error (#12) * Fix(EventLog): Fix SQL error * Adapt CHANGELOG --- CHANGELOG.md | 1 + inc/computersync.class.php | 2 +- inc/mobilesync.class.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc0666e..b0e23f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Fixes - SQL error when merging the Jamf device linked to a GLPI asset +- SQL error when adding `Event` ## [3.1.1] diff --git a/inc/computersync.class.php b/inc/computersync.class.php index ab07bd2..12787d6 100644 --- a/inc/computersync.class.php +++ b/inc/computersync.class.php @@ -630,7 +630,7 @@ public static function import(string $itemtype, int $jamf_items_id, $use_transac ]); if ($iterator->count()) { // Already imported - Event::log(-1, $itemtype, 4, 'Jamf plugin', "Jamf computer $jamf_items_id not imported. A {$itemtype::getTypeName(1)} exists with the same uuid."); + Event::log(0, $itemtype, 4, 'Jamf plugin', "Jamf computer $jamf_items_id not imported. A {$itemtype::getTypeName(1)} exists with the same uuid."); return false; } diff --git a/inc/mobilesync.class.php b/inc/mobilesync.class.php index 027a076..3cf6ec1 100644 --- a/inc/mobilesync.class.php +++ b/inc/mobilesync.class.php @@ -773,7 +773,7 @@ public static function import(string $itemtype, int $jamf_items_id, $use_transac } if ($iterator->count()) { // Already imported - Event::log(-1, $itemtype, 4, 'Jamf plugin', "Jamf mobile device $jamf_items_id not imported. A {$itemtype::getTypeName(1)} exists with the same uuid."); + Event::log(0, $itemtype, 4, 'Jamf plugin', "Jamf mobile device $jamf_items_id not imported. A {$itemtype::getTypeName(1)} exists with the same uuid."); return false; }