no more needed
This commit is contained in:
parent
ce85692045
commit
64201413a1
4 changed files with 3 additions and 14 deletions
|
@ -27,7 +27,7 @@ class Backend extends dcNsProcess
|
||||||
{
|
{
|
||||||
public static function init(): bool
|
public static function init(): bool
|
||||||
{
|
{
|
||||||
static::$init = defined('DC_CONTEXT_ADMIN') && My::phpCompliant();
|
static::$init = defined('DC_CONTEXT_ADMIN');
|
||||||
|
|
||||||
return static::$init;
|
return static::$init;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ class Frontend extends dcNsProcess
|
||||||
{
|
{
|
||||||
public static function init(): bool
|
public static function init(): bool
|
||||||
{
|
{
|
||||||
static::$init = My::phpCompliant();
|
static::$init = defined('DC_RC_PATH');
|
||||||
|
|
||||||
return static::$init;
|
return static::$init;
|
||||||
}
|
}
|
||||||
|
|
11
src/My.php
11
src/My.php
|
@ -33,9 +33,6 @@ class My
|
||||||
'waning_crescent_moon' => 'wcm2.png',
|
'waning_crescent_moon' => 'wcm2.png',
|
||||||
];
|
];
|
||||||
|
|
||||||
/** @var string This module required php version */
|
|
||||||
public const PHP_MIN = '7.4';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This module id.
|
* This module id.
|
||||||
*/
|
*/
|
||||||
|
@ -61,12 +58,4 @@ class My
|
||||||
{
|
{
|
||||||
return dirname(__DIR__);
|
return dirname(__DIR__);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Check this module PHP version compliant.
|
|
||||||
*/
|
|
||||||
public static function phpCompliant(): bool
|
|
||||||
{
|
|
||||||
return version_compare(phpversion(), self::PHP_MIN, '>=');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ class Prepend extends dcNsProcess
|
||||||
{
|
{
|
||||||
public static function init(): bool
|
public static function init(): bool
|
||||||
{
|
{
|
||||||
static::$init = My::phpCompliant();
|
static::$init = defined('DC_RC_PATH');
|
||||||
|
|
||||||
return static::$init;
|
return static::$init;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue