Skip to content

Commit

Permalink
Released version 3.3.38.
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Berthereau authored and Daniel Berthereau committed Jan 2, 2023
1 parent 3091b4f commit 3e2450c
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config/module.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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.3.37"
version = "3.3.38"
omeka_version_constraint = "^3.1.0"
dependencies = "Log"
37 changes: 37 additions & 0 deletions data/scripts/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -674,3 +674,40 @@
);
$messenger->addSuccess($message);
}

if (version_compare($oldVersion, '3.3.38', '<')) {
$user = $services->get('Omeka\AuthenticationService')->getIdentity();

// The resource "bulk_importers" is not available during upgrade.
require_once dirname(__DIR__, 2) . '/src/Entity/Import.php';
require_once dirname(__DIR__, 2) . '/src/Entity/Importer.php';

$filenames = [
'xml - ead.php',
];
foreach ($filenames as $filename) {
$filepath = dirname(__DIR__) . '/importers/' . $filename;
$data = include $filepath;
$data['owner'] = $user;
$entity = new \BulkImport\Entity\Importer();
foreach ($data as $key => $value) {
$method = 'set' . ucfirst($key);
$entity->$method($value);
}
$entityManager->persist($entity);
}
$entityManager->flush();

$message = new Message(
'It is now possible to import xml ead.' // @translate
);
$messenger->addSuccess($message);
$message = new Message(
'It is now possible to pass params to xsl conversion for xml sources.' // @translate
);
$messenger->addSuccess($message);
$message = new Message(
'It is now possible to create table of contents for IIIF viewer from mets and ead sources.' // @translate
);
$messenger->addSuccess($message);
}

0 comments on commit 3e2450c

Please sign in to comment.