no more need to set version

master
Jean-Christian Paul Denis 2022-12-08 00:24:31 +01:00
parent d8eaa8c368
commit 35db512230
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
1 changed files with 5 additions and 5 deletions

View File

@ -18,10 +18,13 @@ 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');
# Check installed version
if (version_compare(dcCore::app()->getVersion($mod_id), $new_version, '>=')) {
if (version_compare(
dcCore::app()->getVersion($mod_id),
dcCore::app()->plugins->moduleInfo($mod_id, 'version'),
'>='
)) {
return null;
}
@ -65,9 +68,6 @@ try {
$s->put('periodical_updurl', false, 'boolean', 'Update post url', false, true);
$s->put('periodical_pub_order', 'post_dt asc', 'string', 'Order of publication', false, true);
# Version
dcCore::app()->setVersion($mod_id, $new_version);
return true;
} catch (Exception $e) {
dcCore::app()->error->add($e->getMessage());