From bab1d2accdb54338083654a43ee1da50c986bb14 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sun, 6 Aug 2023 19:12:48 +0200 Subject: [PATCH] remove unusefull code --- src/Backend.php | 1 - src/BackendBehaviors.php | 10 ---------- 2 files changed, 11 deletions(-) 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')); }