From e7717ed186e44ffa45c2a959978d69b2ea2da663 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Mon, 3 Apr 2023 12:22:31 +0100 Subject: [PATCH] Fix bug preventing disabling tracking feature Signed-off-by: Kamil Tekiela --- libraries/classes/ConfigStorage/Relation.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/classes/ConfigStorage/Relation.php b/libraries/classes/ConfigStorage/Relation.php index e55d787ed0..57a8dad2d6 100644 --- a/libraries/classes/ConfigStorage/Relation.php +++ b/libraries/classes/ConfigStorage/Relation.php @@ -1626,6 +1626,11 @@ class Relation $createQueries = null; $foundOne = false; foreach ($tablesToFeatures as $table => $feature) { + if (($GLOBALS['cfg']['Server'][$feature] ?? null) === false) { + // The feature is disabled by the user in config + continue; + } + // Check if the table already exists // use the possible replaced name first and fallback on the table name // if no replacement exists