From 0ab2e947a0b0fbb3395980f2061f2a99d3e65335 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Thu, 8 Dec 2022 00:20:38 +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 a9a0280..0b489b3 100644 --- a/_install.php +++ b/_install.php @@ -14,14 +14,15 @@ if (!defined('DC_RC_PATH')) { return null; } -$label = basename(__DIR__); -$new_version = dcCore::app()->plugins->moduleInfo($label, 'version'); - -if (version_compare(dcCore::app()->getVersion($label), $new_version, '>=')) { - return; -} - try { + if (version_compare( + dcCore::app()->getVersion(basename(__DIR__)), + dcCore::app()->plugins->moduleInfo(basename(__DIR__), 'version'), + '>=' + )) { + return null; + } + dcCore::app()->blog->settings->addNamespace('myurlhandlers'); dcCore::app()->blog->settings->myurlhandlers->put( 'url_handlers', @@ -30,7 +31,6 @@ try { 'Personalized URL handlers', false ); - dcCore::app()->setVersion($label, $new_version); return true; } catch (Exception $e) {