no more need to set version

This commit is contained in:
Jean-Christian Paul Denis 2022-12-08 00:04:15 +01:00
parent 994c3054e7
commit 86475e42f8
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951

View File

@ -18,10 +18,9 @@ try {
# Grab info
$mod_id = basename(__DIR__);
$dc_min = dcCore::app()->plugins->moduleInfo($mod_id, 'requires')[0][1];
$new_version = dcCore::app()->plugins->moduleInfo($mod_id, 'version');
$old_version = dcCore::app()->getVersion($mod_id);
if (version_compare($old_version, $new_version, '>=')) {
if (version_compare($old_version, dcCore::app()->plugins->moduleInfo($mod_id, 'version'), '>=')) {
return null;
}
@ -92,9 +91,6 @@ try {
include_once dirname(__FILE__) . '/inc/lib.epc.update.php';
}
# Version
dcCore::app()->setVersion($mod_id, $new_version);
return true;
} catch (Exception $e) {
dcCore::app()->error->add($e->getMessage());