X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FRender%2FFriendicaSmartyEngine.php;h=6fc8f4480676eb892583c7f113968ff2bd4fc243;hb=60532ee7e4152af9997e0d7b69c7b35262d5528d;hp=6884364c2678ae14f93b68e497e38e284b5858ca;hpb=346f99b87798322866c2f95afdb23d82923f3d2c;p=friendica.git
diff --git a/src/Render/FriendicaSmartyEngine.php b/src/Render/FriendicaSmartyEngine.php
index 6884364c26..6fc8f44806 100644
--- a/src/Render/FriendicaSmartyEngine.php
+++ b/src/Render/FriendicaSmartyEngine.php
@@ -1,6 +1,6 @@
smarty = new FriendicaSmarty($this->theme, $this->theme_info);
if (!is_writable(DI::basePath() . '/view/smarty3')) {
- echo "ERROR: folder view/smarty3/ must be writable by webserver.";
- exit();
+ $admin_message = DI::l10n()->t('The folder view/smarty3/ must be writable by webserver.');
+ DI::logger()->critical($admin_message);
+ $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);
}
}
@@ -78,6 +83,8 @@ final class FriendicaSmartyEngine extends TemplateEngine
Hook::callAll('template_vars', $arr);
$vars = $arr['vars'];
+ $this->smarty->clearAllAssign();
+
foreach ($vars as $key => $value) {
if ($key[0] === '$') {
$key = substr($key, 1);