fix init check

master
Jean-Christian Paul Denis 2023-03-19 21:35:09 +01:00
parent d582de5d71
commit a989f790fd
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
1 changed files with 3 additions and 5 deletions

View File

@ -21,16 +21,14 @@ class Backend extends dcNsProcess
{
public static function init(): bool
{
if (defined('DC_CONTEXT_ADMIN')) {
self::$init = dcCore::app()->auth->isSuperAdmin();
}
static::$init = defined('DC_CONTEXT_ADMIN') && dcCore::app()->auth->isSuperAdmin();
return self::$init;
return static::$init;
}
public static function process(): bool
{
if (!self::$init) {
if (!static::$init) {
return false;
}