fix static init

This commit is contained in:
Jean-Christian Paul Denis 2023-03-26 21:04:37 +02:00
parent ca80bb69c7
commit f95ee36f69
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
4 changed files with 16 additions and 18 deletions

View File

@ -22,14 +22,14 @@ class Frontend extends dcNsProcess
{
public static function init(): bool
{
self::$init = defined('DC_RC_PATH');
static::$init = defined('DC_RC_PATH');
return self::$init;
return static::$init;
}
public static function process(): bool
{
if (!self::$init || !Utils::isActive()) {
if (!static::$init || !Utils::isActive()) {
return false;
}

View File

@ -22,14 +22,14 @@ class Install extends dcNsProcess
{
public static function init(): bool
{
self::$init = defined('DC_CONTEXT_ADMIN') && dcCore::app()->newVersion(My::id(), dcCore::app()->plugins->moduleInfo(My::id(), 'version'));
static::$init = defined('DC_CONTEXT_ADMIN') && dcCore::app()->newVersion(My::id(), dcCore::app()->plugins->moduleInfo(My::id(), 'version'));
return self::$init;
return static::$init;
}
public static function process(): bool
{
if (!self::$init) {
if (!static::$init) {
return false;
}

View File

@ -40,20 +40,18 @@ class Manage extends dcNsProcess
{
public static function init(): bool
{
if (defined('DC_CONTEXT_ADMIN')) {
dcPage::check(dcCore::app()->auth->makePermissions([
static::$init = defined('DC_CONTEXT_ADMIN') && dcCore::app()->auth->check(
dcCore::app()->auth->makePermissions([
My::PERMISSION,
]));
]), dcCore::app()->blog->id
);
self::$init = true;
}
return self::$init;
return static::$init;
}
public static function process(): bool
{
if (!self::$init) {
if (!static::$init) {
return false;
}
@ -155,7 +153,7 @@ class Manage extends dcNsProcess
public static function render(): void
{
if (!self::$init) {
if (!static::$init) {
return;
}

View File

@ -21,14 +21,14 @@ class Prepend extends dcNsProcess
{
public static function init(): bool
{
self::$init = true;
static::$init = true;
return self::$init;
return static::$init;
}
public static function process(): bool
{
if (!self::$init) {
if (!static::$init) {
return false;
}