Skip to content

Commit

Permalink
Released version 3.4.32.
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Berthereau authored and Daniel Berthereau committed May 20, 2024
1 parent 2d6765e commit 619437a
Show file tree
Hide file tree
Showing 2 changed files with 24 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-BulkExport"
support_link = "https://gitlab.com/Daniel-KM/Omeka-S-module-BulkExport/issues"
configurable = false
version = "3.4.31"
version = "3.4.32"
omeka_version_constraint = "^4.0.0"
dependencies = "Log"
23 changes: 23 additions & 0 deletions data/scripts/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
$messenger = $plugins->get('messenger');
$entityManager = $services->get('Omeka\EntityManager');

$localConfig = include dirname(__DIR__, 2) . '/config/module.config.php';

if (!method_exists($this, 'checkModuleActiveVersion') || !$this->checkModuleActiveVersion('Common', '3.4.58')) {
$message = new \Omeka\Stdlib\Message(
$translate('The module %1$s should be upgraded to version %2$s or later.'), // @translate
Expand Down Expand Up @@ -369,3 +371,24 @@
$connection->executeStatement($sql);
}
}

if (version_compare($oldVersion, '3.4.32', '<')) {
/** @var \Omeka\Settings\SiteSettings $siteSettings */
$siteSettings = $services->get('Omeka\Settings\Site');
$siteIds = $api->search('sites', [], ['returnScalar' => 'id'])->getContent();
$bulkExportViews = $localConfig['bulkexport']['site_settings']['bulkexport_views'];
foreach ($siteIds as $siteId) {
$siteSettings->setTargetId($siteId);
$siteSettings->set('bulkexport_views', $bulkExportViews);
}

$message = new PsrMessage(
'New resource page blocks have been added to display a button to export current resources.' // @translate
);
$messenger->addSuccess($message);

$message = new PsrMessage(
'A new option has been added to display the exporters automatically in selected pages for themes that don’t manage resource page blocks. Check your site if needed.' // @translate
);
$messenger->addWarning($message);
}

0 comments on commit 619437a

Please sign in to comment.