From f5d025138535ab109506d108225d7b59f4100855 Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Thu, 10 May 2018 13:46:51 +0200 Subject: [PATCH] fix(install): fix update of policy properties Signed-off-by: Thierry Bugier --- install/installer.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/install/installer.class.php b/install/installer.class.php index 3ddac95e..a9a62ead 100644 --- a/install/installer.class.php +++ b/install/installer.class.php @@ -332,10 +332,11 @@ protected function createPolicies() { $symbol = $policyData['symbol']; $rows = $policy->find("`symbol`='$symbol'"); + $policyData['type_data'] = json_encode($policyData['type_data'], + JSON_UNESCAPED_SLASHES + ); if (count($rows) == 0) { // Create only non existing policy objects - $policyData['type_data'] = json_encode($policyData['type_data'], - JSON_UNESCAPED_SLASHES); $policy->add($policyData); } else { // Update default value and recommended value for existing policy objects @@ -345,6 +346,7 @@ protected function createPolicies() { 'id' => $policy2->getID(), 'default_value' => $policyData['default_value'], 'recommended_value' => $policyData['recommended_value'], + 'type_data' => $policyData['type_data'], 'plugin_flyvemdm_policycategories_id' => $categoryId, ]); }