From 82526b75c2e334cd31c854cf0bb74f4445fbe1fc Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Thu, 8 Dec 2022 00:22:14 +0100 Subject: [PATCH] no more need to set version --- _install.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/_install.php b/_install.php index b0dff8c..e96afe4 100644 --- a/_install.php +++ b/_install.php @@ -14,14 +14,15 @@ if (!defined('DC_CONTEXT_ADMIN')) { return null; } -$new_version = dcCore::app()->plugins->moduleInfo('noodles', 'version'); -$old_version = dcCore::app()->getVersion('noodles'); - -if (version_compare($old_version, $new_version, '>=')) { - return null; -} - try { + if (version_compare( + dcCore::app()->getVersion('noodles'), + dcCore::app()->plugins->moduleInfo('noodles', 'version'), + '>=' + )) { + return null; + } + dcCore::app()->blog->settings->addNamespace('noodles'); dcCore::app()->blog->settings->noodles->put( 'noodles_active', @@ -55,7 +56,6 @@ try { false, true ); - dcCore::app()->setVersion('noodles', $new_version); return true; } catch (Exception $e) {