]> git.mxchange.org Git - friendica.git/blobdiff - src/Render/FriendicaSmartyEngine.php
Merge remote-tracking branch 'upstream/develop' into conversation-receivers
[friendica.git] / src / Render / FriendicaSmartyEngine.php
index 8eafd7d94ac07d7719e22f9c7c1d55c8095ef3e7..6fc8f4480676eb892583c7f113968ff2bd4fc243 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
  *
@@ -23,7 +23,7 @@ namespace Friendica\Render;
 
 use Friendica\Core\Hook;
 use Friendica\DI;
-use Friendica\Network\HTTPException\InternalServerErrorException;
+use Friendica\Network\HTTPException\ServiceUnavailableException;
 use Friendica\Util\Strings;
 
 /**
@@ -51,10 +51,10 @@ final class FriendicaSmartyEngine extends TemplateEngine
                if (!is_writable(DI::basePath() . '/view/smarty3')) {
                        $admin_message = DI::l10n()->t('The folder view/smarty3/ must be writable by webserver.');
                        DI::logger()->critical($admin_message);
-                       $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 InternalServerErrorException($message);
+                       throw new ServiceUnavailableException($message);
                }
        }