From 1bc9e6e7bfe09c27780456de632071d59518d5c9 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sat, 10 Dec 2022 14:47:41 +0100 Subject: [PATCH] use dotclear method to check version --- _install.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/_install.php b/_install.php index 5cbc43c..7088581 100644 --- a/_install.php +++ b/_install.php @@ -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; }