diff --git a/src/Backend.php b/src/Backend.php index 2427a90..7401f1d 100644 --- a/src/Backend.php +++ b/src/Backend.php @@ -22,7 +22,6 @@ class Backend extends dcNsProcess public static function init(): bool { static::$init = defined('DC_CONTEXT_ADMIN') - && !is_null(dcCore::app()->auth) // nullsafe PHP < 8.0 && dcCore::app()->auth->isSuperAdmin(); return static::$init; diff --git a/src/BackendBehaviors.php b/src/BackendBehaviors.php index 348f63c..f272614 100644 --- a/src/BackendBehaviors.php +++ b/src/BackendBehaviors.php @@ -26,22 +26,12 @@ class BackendBehaviors # admin plugins page tab public static function pluginsTabs(): void { - // nullsafe PHP < 8.0 - if (is_null(dcCore::app()->adminurl)) { - return; - } - self::modulesToolsTabs(dcCore::app()->plugins, explode(',', DC_DISTRIB_PLUGINS), dcCore::app()->adminurl->get('admin.plugins')); } # admin themes page tab public static function themesTabs(): void { - // nullsafe PHP < 8.0 - if (is_null(dcCore::app()->adminurl)) { - return; - } - self::modulesToolsTabs(dcCore::app()->themes, explode(',', DC_DISTRIB_THEMES), dcCore::app()->adminurl->get('admin.blog.theme')); }