Created
October 12, 2022 12:47
-
-
Save DenisRuban/c7a540ef66f202655a0a4fe5e6a22d7c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/_tools/migration/scripts/4.15.3/post_script.php b/_tools/migration/scripts/4.15.3/post_script.php | |
new file mode 100644 | |
index 0000000000..32d813528b | |
--- /dev/null | |
+++ b/_tools/migration/scripts/4.15.3/post_script.php | |
@@ -0,0 +1,8 @@ | |
+<?php | |
+ | |
+use Tygh\Registry; | |
+ | |
+if (Registry::get('addons.gdpr.status')) { | |
+ $klaro_config = fn_gdpr_get_klaro_config(); | |
+ fn_gdpr_save_js_config($klaro_config); | |
+} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/addons/gdpr/func.php b/app/addons/gdpr/func.php | |
index 37d94e3d05..71aa22c0e8 100644 | |
--- a/app/addons/gdpr/func.php | |
+++ b/app/addons/gdpr/func.php | |
@@ -400,5 +400,5 @@ function fn_gdpr_save_js_config(array $klaro_config) | |
fn_mkdir($file_dir); | |
$file_path = sprintf('%s/%s', $file_dir, 'config.js'); | |
- file_put_contents($file_path, 'var klaroConfig = ' . json_encode($klaro_config) . ';'); | |
+ file_put_contents($file_path, 'var cookieConfig = ' . json_encode($klaro_config) . ';'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/js/addons/gdpr/func.js b/js/addons/gdpr/func.js | |
index 2f916258ac..a758ef6fa3 100644 | |
--- a/js/addons/gdpr/func.js | |
+++ b/js/addons/gdpr/func.js | |
@@ -38,10 +38,9 @@ | |
}); | |
$('document').ready(() => { | |
- if (typeof klaroConfig !== 'undefined' && klaroConfig.services.length) { | |
- klaroConfig = normalizeTranslations(klaroConfig); | |
- | |
- klaro.setup(klaroConfig); | |
+ if (typeof cookieConfig !== 'undefined' && cookieConfig.services.length) { | |
+ const normilizedConfig = normalizeTranslations(cookieConfig); | |
+ klaro.setup(normilizedConfig); | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment