remove unused nullsafe check
This commit is contained in:
parent
5192dea04a
commit
b3edda6cc8
@ -10,7 +10,7 @@
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
if (!defined('DC_RC_PATH') || is_null(dcCore::app()->auth)) {
|
||||
if (!defined('DC_RC_PATH')) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ class Backend extends dcNsProcess
|
||||
public static function init(): bool
|
||||
{
|
||||
static::$init == defined('DC_CONTEXT_ADMIN')
|
||||
&& !is_null(dcCore::app()->blog) && !is_null(dcCore::app()->auth)
|
||||
&& !is_null(dcCore::app()->blog)
|
||||
&& dcCore::app()->auth->check(dcCore::app()->auth->makePermissions([
|
||||
My::PERMISSION_TEMPLATOR,
|
||||
dcCore::app()->auth::PERMISSION_CONTENT_ADMIN,
|
||||
@ -41,7 +41,7 @@ class Backend extends dcNsProcess
|
||||
}
|
||||
|
||||
// nullsafe
|
||||
if (is_null(dcCore::app()->auth) || is_null(dcCore::app()->blog) || is_null(dcCore::app()->adminurl)) {
|
||||
if (is_null(dcCore::app()->blog)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,6 @@ class Manage extends dcNsProcess
|
||||
public static function init(): bool
|
||||
{
|
||||
static::$init == defined('DC_CONTEXT_ADMIN')
|
||||
&& !is_null(dcCore::app()->auth)
|
||||
&& !is_null(dcCore::app()->blog)
|
||||
&& dcCore::app()->auth->check(dcCore::app()->auth->makePermissions([
|
||||
dcCore::app()->auth::PERMISSION_CONTENT_ADMIN,
|
||||
@ -49,7 +48,7 @@ class Manage extends dcNsProcess
|
||||
}
|
||||
|
||||
// nullsafe
|
||||
if (is_null(dcCore::app()->blog) || is_null(dcCore::app()->adminurl)) {
|
||||
if (is_null(dcCore::app()->blog)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -146,7 +145,7 @@ class Manage extends dcNsProcess
|
||||
}
|
||||
|
||||
// nullsafe
|
||||
if (is_null(dcCore::app()->auth) || is_null(dcCore::app()->blog) || is_null(dcCore::app()->adminurl) || is_null(dcCore::app()->auth->user_prefs)) {
|
||||
if (is_null(dcCore::app()->blog)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ class Pager
|
||||
{
|
||||
public static function line(File $f, int $i): string
|
||||
{
|
||||
if (is_null(dcCore::app()->blog) || is_null(dcCore::app()->adminurl)) {
|
||||
if (is_null(dcCore::app()->blog)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user