fix static init
This commit is contained in:
parent
e1129e39d6
commit
de3f675e33
4 changed files with 18 additions and 19 deletions
|
@ -25,14 +25,14 @@ class Backend extends dcNsProcess
|
||||||
{
|
{
|
||||||
public static function init(): bool
|
public static function init(): bool
|
||||||
{
|
{
|
||||||
self::$init = defined('DC_CONTEXT_ADMIN');
|
static::$init = defined('DC_CONTEXT_ADMIN');
|
||||||
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,20 +30,19 @@ 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')
|
||||||
dcPage::check(dcCore::app()->auth->makePermissions([
|
&& dcCore:app()->auth->check(
|
||||||
dcAuth::PERMISSION_CONTENT_ADMIN,
|
dcCore::app()->auth->makePermissions([
|
||||||
]));
|
dcAuth::PERMISSION_CONTENT_ADMIN,
|
||||||
|
]), 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,7 +116,7 @@ class Manage extends dcNsProcess
|
||||||
|
|
||||||
public static function render(): void
|
public static function render(): void
|
||||||
{
|
{
|
||||||
if (!self::$init) {
|
if (!static::$init) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,14 +20,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 a new issue