From 3131fb6fe5993354ec80156863f571b2c315e4a8 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Wed, 10 May 2023 11:38:33 +0200 Subject: [PATCH] no more needed --- src/Backend.php | 1 - src/Frontend.php | 2 +- src/Manage.php | 1 - src/My.php | 11 ----------- 4 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/Backend.php b/src/Backend.php index 5661f6d..baa9a2e 100644 --- a/src/Backend.php +++ b/src/Backend.php @@ -25,7 +25,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 f3b4e4b..acf6c06 100644 --- a/src/Frontend.php +++ b/src/Frontend.php @@ -25,7 +25,7 @@ class Frontend extends dcNsProcess public static function init(): bool { - static::$init = true; + static::$init = defined('DC_RC_PATH'); return static::$init; } diff --git a/src/Manage.php b/src/Manage.php index cc1601f..ece65fa 100644 --- a/src/Manage.php +++ b/src/Manage.php @@ -37,7 +37,6 @@ class Manage 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/My.php b/src/My.php index de2c3eb..2b46812 100644 --- a/src/My.php +++ b/src/My.php @@ -21,9 +21,6 @@ use dcCore; */ class My { - /** @var string Required php version */ - public const PHP_MIN = '7.4'; - /** * This module id. */ @@ -50,14 +47,6 @@ class My return dirname(__DIR__); } - /** - * Check this module PHP version compliant. - */ - public static function phpCompliant(): bool - { - return version_compare(phpversion(), self::PHP_MIN, '>='); - } - /** * Get distributed models. *