From eb80f52efe5b699fe83e547aba48611c50d362fd Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Tue, 6 Feb 2018 05:39:19 -0500 Subject: [PATCH] Fix issue processwire/processwire-issues#487 where svg files in $config->pageFileSecure mode needed entry in $config->fileContentTypes --- wire/config.php | 1 + .../Fieldtype/FieldtypeOptions/SelectableOptionConfig.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/wire/config.php b/wire/config.php index 5c7ea80a..860285cf 100644 --- a/wire/config.php +++ b/wire/config.php @@ -562,6 +562,7 @@ $config->fileContentTypes = array( 'jpg' => 'image/jpeg', 'jpeg' => 'image/jpeg', 'png' => 'image/x-png', + 'svg' => 'image/svg+xml' ); diff --git a/wire/modules/Fieldtype/FieldtypeOptions/SelectableOptionConfig.php b/wire/modules/Fieldtype/FieldtypeOptions/SelectableOptionConfig.php index a0204f56..73a7bd84 100644 --- a/wire/modules/Fieldtype/FieldtypeOptions/SelectableOptionConfig.php +++ b/wire/modules/Fieldtype/FieldtypeOptions/SelectableOptionConfig.php @@ -91,7 +91,7 @@ class SelectableOptionConfig extends Wire { } } - $removedOptionIDs = $this->manager->getRemovedOptionIDs($this->field); // identified for removal + $removedOptionIDs = $this->manager->getRemovedOptionIDs(); // identified for removal if(count($removedOptionIDs)) { // stuff in session for next request $this->wire('session')->set($ns, 'removedOptionIDs', $removedOptionIDs);