From dcd47ddf5b311ef6f4e247d2bddbeccff89bc3a0 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Wed, 10 May 2023 11:22:32 +0200 Subject: [PATCH] no more needed --- src/Backend.php | 1 - src/Frontend.php | 2 +- src/Install.php | 1 - src/My.php | 11 ----------- 4 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/Backend.php b/src/Backend.php index 66814ea..869a8cf 100644 --- a/src/Backend.php +++ b/src/Backend.php @@ -37,7 +37,6 @@ class Backend extends dcNsProcess public static function init(): bool { static::$init = defined('DC_CONTEXT_ADMIN') - && My::phpCompliant() && !is_null(dcCore::app()->auth) && !is_null(dcCore::app()->blog) // nullsafe PHP < 8.0 && dcCore::app()->auth->check(dcCore::app()->auth->makePermissions([ dcCore::app()->auth::PERMISSION_CONTENT_ADMIN, diff --git a/src/Frontend.php b/src/Frontend.php index 5f78053..1f13eea 100644 --- a/src/Frontend.php +++ b/src/Frontend.php @@ -23,7 +23,7 @@ class Frontend extends dcNsProcess { public static function init(): bool { - static::$init = My::phpCompliant(); + static::$init = defined('DC_RC_PATH'); return static::$init; } diff --git a/src/Install.php b/src/Install.php index ff24e1a..5d6bf63 100644 --- a/src/Install.php +++ b/src/Install.php @@ -23,7 +23,6 @@ class Install extends dcNsProcess public static function init(): bool { static::$init = defined('DC_CONTEXT_ADMIN') - && My::phpCompliant() && dcCore::app()->newVersion(My::id(), dcCore::app()->plugins->moduleInfo(My::id(), 'version')); return static::$init; diff --git a/src/My.php b/src/My.php index d9ffed9..c69f581 100644 --- a/src/My.php +++ b/src/My.php @@ -46,9 +46,6 @@ class My /** @var string disclaimer specific session prefix */ public const SESSION_PREFIX = 'dc_disclaimer_sess_'; - /** @var string Required php version */ - public const PHP_MIN = '7.4'; - /** * This module id. */ @@ -74,12 +71,4 @@ class My { return dirname(__DIR__); } - - /** - * Check this module PHP version compliant. - */ - public static function phpCompliant(): bool - { - return version_compare(phpversion(), self::PHP_MIN, '>='); - } }