fix static init
This commit is contained in:
parent
ca80bb69c7
commit
f95ee36f69
@ -22,14 +22,14 @@ class Frontend extends dcNsProcess
|
|||||||
{
|
{
|
||||||
public static function init(): bool
|
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
|
public static function process(): bool
|
||||||
{
|
{
|
||||||
if (!self::$init || !Utils::isActive()) {
|
if (!static::$init || !Utils::isActive()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,14 +22,14 @@ class Install extends dcNsProcess
|
|||||||
{
|
{
|
||||||
public static function init(): bool
|
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
|
public static function process(): bool
|
||||||
{
|
{
|
||||||
if (!self::$init) {
|
if (!static::$init) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,20 +40,18 @@ class Manage extends dcNsProcess
|
|||||||
{
|
{
|
||||||
public static function init(): bool
|
public static function init(): bool
|
||||||
{
|
{
|
||||||
if (defined('DC_CONTEXT_ADMIN')) {
|
static::$init = defined('DC_CONTEXT_ADMIN') && dcCore::app()->auth->check(
|
||||||
dcPage::check(dcCore::app()->auth->makePermissions([
|
dcCore::app()->auth->makePermissions([
|
||||||
My::PERMISSION,
|
My::PERMISSION,
|
||||||
]));
|
]), dcCore::app()->blog->id
|
||||||
|
);
|
||||||
|
|
||||||
self::$init = true;
|
return static::$init;
|
||||||
}
|
|
||||||
|
|
||||||
return self::$init;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function process(): bool
|
public static function process(): bool
|
||||||
{
|
{
|
||||||
if (!self::$init) {
|
if (!static::$init) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -155,7 +153,7 @@ class Manage extends dcNsProcess
|
|||||||
|
|
||||||
public static function render(): void
|
public static function render(): void
|
||||||
{
|
{
|
||||||
if (!self::$init) {
|
if (!static::$init) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,14 +21,14 @@ class Prepend extends dcNsProcess
|
|||||||
{
|
{
|
||||||
public static function init(): bool
|
public static function init(): bool
|
||||||
{
|
{
|
||||||
self::$init = true;
|
static::$init = true;
|
||||||
|
|
||||||
return self::$init;
|
return static::$init;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function process(): bool
|
public static function process(): bool
|
||||||
{
|
{
|
||||||
if (!self::$init) {
|
if (!static::$init) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user