From b7e3a0bdecb21d42d899bc19d35690e498c5c8b6 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sat, 10 Dec 2022 15:30:51 +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 5c06f3b..b25189a 100644 --- a/_install.php +++ b/_install.php @@ -15,10 +15,9 @@ if (!defined('DC_CONTEXT_ADMIN')) { } try { - if (version_compare( - dcCore::app()->getVersion(basename(__DIR__)), - dcCore::app()->plugins->moduleInfo(basename(__DIR__), 'version'), - '>=' + if (!dcCore::app()->newVersion( + basename(__DIR__), + dcCore::app()->plugins->moduleInfo(basename(__DIR__), 'version') )) { return null; } @@ -33,9 +32,7 @@ try { ->filesalias_disposable('smallint', 0, false, 0) ->primary('pk_filesalias', 'blog_id', 'filesalias_url') - ->index('idx_filesalias_blog_id', 'btree', 'blog_id') - ->reference('fk_filesalias_blog', 'blog_id', 'blog', 'blog_id', 'cascade', 'cascade') ;