no more need to set version

This commit is contained in:
Jean-Christian Paul Denis 2022-12-08 00:24:31 +01:00
parent d8eaa8c368
commit 35db512230
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951

View File

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