From ddba84142295d447cc653d2496ec1df67a989792 Mon Sep 17 00:00:00 2001 From: Daniel Berthereau Date: Mon, 9 Dec 2024 00:00:00 +0000 Subject: [PATCH] Released version 3.4.57. --- config/module.ini | 2 +- data/scripts/upgrade.php | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/config/module.ini b/config/module.ini index 796db1a..544d4eb 100644 --- a/config/module.ini +++ b/config/module.ini @@ -8,6 +8,6 @@ author_link = "https://gitlab.com/Daniel-KM" module_link = "https://gitlab.com/Daniel-KM/Omeka-S-module-BulkImport" support_link = "https://gitlab.com/Daniel-KM/Omeka-S-module-BulkImport/-/issues" configurable = true -version = "3.4.56" +version = "3.4.57" omeka_version_constraint = "^4.0.0" dependencies = "Common, Log" diff --git a/data/scripts/upgrade.php b/data/scripts/upgrade.php index d9d9714..0ad5217 100644 --- a/data/scripts/upgrade.php +++ b/data/scripts/upgrade.php @@ -449,4 +449,34 @@ $connection->executeStatement($sql); } +if (version_compare($oldVersion, '3.4.57', '<')) { + // Included application/json and application/ld+json in the whitelist of + // media-types and json and jsonld in the whitelist of extensions. + $whitelist = $settings->get('media_type_whitelist', []); + $whitelist = array_unique(array_merge(array_values($whitelist), [ + 'application/json', + 'application/ld+json', + ])); + sort($whitelist); + $settings->set('media_type_whitelist', $whitelist); + + $whitelist = $settings->get('extension_whitelist', []); + $whitelist = array_unique(array_merge(array_values($whitelist), [ + 'json', + 'jsonld', + ])); + sort($whitelist); + $settings->set('extension_whitelist', $whitelist); + + $message = new PsrMessage( + 'It is now possible to import iiif presentation, not only iiif image.' // @translate + ); + $messenger->addSuccess($message); + + $message = new PsrMessage( + 'A new option allows to clean inputs data, for example trim, change case, replace single quote by apostrophe, etc.' // @translate + ); + $messenger->addSuccess($message); +} + // TODO Remove bulkimport_allow_empty_files and bulkimport_local_path in some version to keep config for EasyAdmin.