use dotclear method to check version

This commit is contained in:
Jean-Christian Paul Denis 2022-12-10 14:47:41 +01:00
parent a374e6d918
commit 1bc9e6e7bf
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951

View File

@ -15,12 +15,9 @@ if (!defined('DC_CONTEXT_ADMIN')) {
}
try {
$mod_id = basename(__DIR__);
if (version_compare(
dcCore::app()->getVersion($mod_id),
dcCore::app()->plugins->moduleInfo($mod_id, 'version'),
'>='
if (!dcCore::app()->newVersion(
basename(__DIR__),
dcCore::app()->plugins->moduleInfo(basename(__DIR__), 'version')
)) {
return null;
}