fix static init
This commit is contained in:
parent
ca80bb69c7
commit
f95ee36f69
4 changed files with 16 additions and 18 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue