diff --git a/src/Backend.php b/src/Backend.php index 2551a00..d469b1c 100644 --- a/src/Backend.php +++ b/src/Backend.php @@ -25,8 +25,7 @@ class Backend extends dcNsProcess { public static function init(): bool { - static::$init = defined('DC_CONTEXT_ADMIN') - && My::phpCompliant(); + static::$init = defined('DC_CONTEXT_ADMIN'); return static::$init; } diff --git a/src/Frontend.php b/src/Frontend.php index 29b0df8..a10c197 100644 --- a/src/Frontend.php +++ b/src/Frontend.php @@ -21,7 +21,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 07dda7d..332b4b8 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/Manage.php b/src/Manage.php index 1b2ae18..82091ae 100644 --- a/src/Manage.php +++ b/src/Manage.php @@ -38,7 +38,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) && dcCore::app()->auth->check(dcCore::app()->auth->makePermissions([ dcCore::app()->auth::PERMISSION_ADMIN, diff --git a/src/My.php b/src/My.php index f1be029..9e4a932 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. */ @@ -49,12 +46,4 @@ class My { return dirname(__DIR__); } - - /** - * Check this module PHP version compliant. - */ - public static function phpCompliant(): bool - { - return version_compare(phpversion(), self::PHP_MIN, '>='); - } } diff --git a/src/Prepend.php b/src/Prepend.php index 0b3bc45..c3c2701 100644 --- a/src/Prepend.php +++ b/src/Prepend.php @@ -21,7 +21,7 @@ class Prepend extends dcNsProcess { public static function init(): bool { - static::$init = My::phpCompliant(); + static::$init = defined('DC_RC_PATH'); return static::$init; }