X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FRenderer.php;h=608c707434ca539c295b68425c943c99c757da88;hb=39c2282c1292af173f854e2a4338c601f9ba58f6;hp=4eb4084728f462b6cbbd7175a75e3ad720c1b297;hpb=4236a9a1059411c1d6483f772af30322ce713f0e;p=friendica.git diff --git a/src/Core/Renderer.php b/src/Core/Renderer.php index 4eb4084728..608c707434 100644 --- a/src/Core/Renderer.php +++ b/src/Core/Renderer.php @@ -84,7 +84,7 @@ class Renderer $output = $t->replaceMacros($template, $vars); } catch (Exception $e) { DI::logger()->critical($e->getMessage(), ['template' => $template, 'vars' => $vars]); - $message = is_site_admin() ? + $message = DI::app()->isSiteAdmin() ? $e->getMessage() : DI::l10n()->t('Friendica can\'t display this page at the moment, please contact the administrator.'); throw new ServiceUnavailableException($message); @@ -113,7 +113,7 @@ class Renderer $template = $t->getTemplateFile($file, $subDir); } catch (Exception $e) { DI::logger()->critical($e->getMessage(), ['file' => $file, 'subDir' => $subDir]); - $message = is_site_admin() ? + $message = DI::app()->isSiteAdmin() ? $e->getMessage() : DI::l10n()->t('Friendica can\'t display this page at the moment, please contact the administrator.'); throw new ServiceUnavailableException($message); @@ -140,7 +140,7 @@ class Renderer } else { $admin_message = DI::l10n()->t('template engine cannot be registered without a name.'); DI::logger()->critical($admin_message, ['class' => $class]); - $message = is_site_admin() ? + $message = DI::app()->isSiteAdmin() ? $admin_message : DI::l10n()->t('Friendica can\'t display this page at the moment, please contact the administrator.'); throw new ServiceUnavailableException($message); @@ -174,7 +174,7 @@ class Renderer $admin_message = DI::l10n()->t('template engine is not registered!'); DI::logger()->critical($admin_message, ['template_engine' => $template_engine]); - $message = is_site_admin() ? + $message = DI::app()->isSiteAdmin() ? $admin_message : DI::l10n()->t('Friendica can\'t display this page at the moment, please contact the administrator.'); throw new ServiceUnavailableException($message);