<?php
/**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2022, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
use Friendica\Core\Hook;
use Friendica\DI;
-use Friendica\Network\HTTPException\InternalServerErrorException;
+use Friendica\Network\HTTPException\ServiceUnavailableException;
use Friendica\Util\Strings;
/**
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);
}
}
/**
* @inheritDoc
*/
- public function replaceMacros(string $template, array $vars)
+ public function replaceMacros(string $template, array $vars): string
{
if (!Strings::startsWith($template, self::FILE_PREFIX)) {
$template = self::STRING_PREFIX . $template;