Skip to content

Commit

Permalink
Released version 3.4.16.
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Berthereau authored and Daniel Berthereau committed Feb 12, 2024
1 parent 19d03c3 commit 361c5e9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
11 changes: 11 additions & 0 deletions Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,17 @@ class Module extends AbstractModule

protected function preInstall(): void
{
$services = $this->getServiceLocator();
$translate = $services->get('ControllerPluginManager')->get('translate');

if (!method_exists($this, 'checkModuleActiveVersion') || !$this->checkModuleActiveVersion('Common', '3.4.52')) {
$message = new \Omeka\Stdlib\Message(
$translate('The module %1$s should be upgraded to version %2$s or later.'), // @translate
'Common', '3.4.52'
);
throw new \Omeka\Module\Exception\ModuleCannotInstallException((string) $message);
}

$this->installDir();
}

Expand Down
4 changes: 2 additions & 2 deletions config/module.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ author_link = "https://gitlab.com/Daniel-KM"
module_link = "https://gitlab.com/Daniel-KM/Omeka-S-module-EasyAdmin"
support_link = "https://gitlab.com/Daniel-KM/Omeka-S-module-EasyAdmin/-/issues"
configurable = false
version = "3.4.15"
omeka_version_constraint = "^3.1.0 || ^4.0.0"
version = "3.4.16"
omeka_version_constraint = "^4.0.0"
dependencies = "Common"
12 changes: 12 additions & 0 deletions data/scripts/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
$url = $services->get('ViewHelperManager')->get('url');
$api = $plugins->get('api');
$settings = $services->get('Omeka\Settings');
$translate = $plugins->get('translate');
$connection = $services->get('Omeka\Connection');
$messenger = $plugins->get('messenger');
$entityManager = $services->get('Omeka\EntityManager');
Expand Down Expand Up @@ -228,3 +229,14 @@
);
$messenger->addSuccess($message);
}


if (version_compare($oldVersion, '3.4.16', '<')) {
if (!method_exists($this, 'checkModuleActiveVersion') || !$this->checkModuleActiveVersion('Common', '3.4.52')) {
$message = new Message(
$translate('The module %1$s should be upgraded to version %2$s or later.'), // @translate
'Common', '3.4.52'
);
throw new \Omeka\Module\Exception\ModuleCannotInstallException((string) $message);
}
}

0 comments on commit 361c5e9

Please sign in to comment.