no more need to set version

This commit is contained in:
Jean-Christian Denis 2022-12-07 23:57:05 +01:00
parent 324f6c470d
commit d2febcdeba
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951

View file

@ -14,10 +14,11 @@ if (!defined('DC_CONTEXT_ADMIN')) {
return null;
}
$new_version = dcCore::app()->plugins->moduleInfo('activityReport', 'version');
$old_version = dcCore::app()->getVersion('activityReport');
if (version_compare($old_version, $new_version, '>=')) {
if (version_compare(
dcCore::app()->getVersion('activityReport'),
dcCore::app()->plugins->moduleInfo('activityReport', 'version'),
'>='
)) {
return null;
}
@ -54,8 +55,6 @@ try {
$si = new dbStruct(dcCore::app()->con, dcCore::app()->prefix);
$changes = $si->synchronize($s);
dcCore::app()->setVersion('activityReport', $new_version);
return true;
} catch (Exception $e) {
dcCore::app()->error->add($e->getMessage());