From 9746561fb836949ac20d18c462b46379f1026aeb Mon Sep 17 00:00:00 2001 From: Tobias Florin Date: Sat, 25 Nov 2023 22:42:31 +0100 Subject: [PATCH] Fixed bug in rule extension interactive map implementation --- variants/RuleExtensions/interactiveMap/interactiveMap.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/variants/RuleExtensions/interactiveMap/interactiveMap.php b/variants/RuleExtensions/interactiveMap/interactiveMap.php index c56cc959a..a81b8645f 100644 --- a/variants/RuleExtensions/interactiveMap/interactiveMap.php +++ b/variants/RuleExtensions/interactiveMap/interactiveMap.php @@ -13,6 +13,9 @@ public function __construct($Variant, $mapName = 'IA_smallmap.png') if(!$this->Variant->rules[RULE_CUSTOM_MAP]){ // by default, construct the interactive map with a Classic variant instance to laod classic map data $classicVariant = libVariant::loadFromVariantName('Classic'); + // The parent constructor stores the variant itself in the property $this->Variant. + // To still access the rules (to skip any extensions), the rules need to be copied to the injected variant object. + $classicVariant->rules = $Variant->rules; parent::__construct($classicVariant, $mapName); } else { parent::__construct($Variant, $mapName);