]> git.mxchange.org Git - friendica.git/commitdiff
Fixing https://github.com/friendica/friendica/pull/7759#discussion_r337102107
authorPhilipp Holzer <admin+github@philipp.info>
Thu, 24 Oct 2019 19:43:20 +0000 (21:43 +0200)
committerPhilipp Holzer <admin+github@philipp.info>
Thu, 24 Oct 2019 19:43:20 +0000 (21:43 +0200)
src/Module/Diaspora/Receive.php

index 978bccd833027b15ffd0b9e5da35929e5e661082..c787b5f97068d0164319aba888e7c3149f5c5509 100644 (file)
@@ -5,6 +5,7 @@ namespace Friendica\Module\Diaspora;
 use Friendica\App;
 use Friendica\BaseModule;
 use Friendica\Core\Config\Configuration;
+use Friendica\Core\L10n\L10n;
 use Friendica\Model\User;
 use Friendica\Network\HTTPException;
 use Friendica\Protocol\Diaspora;
@@ -34,7 +35,8 @@ class Receive extends BaseModule
                $enabled = $config->get('system', 'diaspora_enabled', false);
                if (!$enabled) {
                        self::$logger->info('Diaspora disabled.');
-                       throw new HTTPException\InternalServerErrorException('Diaspora disabled.');
+                       $l10n = self::getClass(L10n::class);
+                       throw new HTTPException\ForbiddenException($l10n->t('Access denied.'));
                }
 
                /** @var App\Arguments $args */