]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Renderer.php
Merge pull request #11506 from annando/featured-worker
[friendica.git] / src / Core / Renderer.php
index 4eb4084728f462b6cbbd7175a75e3ad720c1b297..29bbb2b89491f83fdd63bfd554108bf5f7eeb65b 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -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);