no more needed
This commit is contained in:
parent
a6580e8d63
commit
dcd47ddf5b
@ -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,
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
11
src/My.php
11
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, '>=');
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user