From 6f9334cbbf73245987de4a24442b2d2b0c8d5a16 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Thu, 8 Dec 2022 00:28:16 +0100 Subject: [PATCH] no more need to set version --- _install.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/_install.php b/_install.php index 58d45ef..43dd9b4 100644 --- a/_install.php +++ b/_install.php @@ -19,8 +19,12 @@ try { $mod_id = basename(__DIR__); # check installed version - if (version_compare(dcCore::app()->getVersion($mod_id), $new_version, '>=')) { - return; + if (version_compare( + dcCore::app()->getVersion($mod_id), + dcCore::app()->plugins->moduleInfo($mod_id, 'version'), + '>=' + )) { + return null; } # Table is the same for plugins @@ -71,9 +75,6 @@ try { require_once __DIR__ . '/inc/patch.0.5.php'; } - # Set module version - dcCore::app()->setVersion($mod_id, $new_version); - return true; } catch (Exception $e) { dcCore::app()->error->add($e->getMessage());