From 11a6dd51899ac19094a8faf46bfb550691b5b1f4 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sat, 10 Dec 2022 15:55:28 +0100 Subject: [PATCH] use dotclear method to check version --- _install.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_install.php b/_install.php index b160208..ff967f1 100644 --- a/_install.php +++ b/_install.php @@ -15,14 +15,14 @@ if (!defined('DC_CONTEXT_ADMIN')) { } try { - $id = basename(__DIR__); - - if (version_compare(dcCore::app()->getVersion($id), dcCore::app()->plugins->moduleInfo($id, 'version'), '>=')) { + if (!dcCore::app()->newVersion( + basename(__DIR__), + dcCore::app()->plugins->moduleInfo(basename(__DIR__), 'version') + )) { return null; } $translater = new dcTranslater(false); $translater->writeSettings(false); - dcCore::app()->setVersion($id, dcCore::app()->plugins->moduleInfo($id, 'version')); return true; } catch (Exception $e) {