]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/WebFinger.php
Merge pull request #7068 from MrPetovan/task/7047-theme-error-page
[friendica.git] / src / Module / WebFinger.php
index 3afcecb0565706c7254b1bea1c163f80a4d40077..0c1a692e1b14d5436530f68d749007ce72a84118 100644 (file)
@@ -5,7 +5,6 @@ namespace Friendica\Module;
 use Friendica\BaseModule;
 use Friendica\Core\L10n;
 use Friendica\Core\Renderer;
-use Friendica\Core\System;
 use Friendica\Network\Probe;
 
 /**
@@ -13,22 +12,14 @@ use Friendica\Network\Probe;
  */
 class WebFinger extends BaseModule
 {
-       public static function init()
+       public static function content()
        {
                if (!local_user()) {
-                       System::httpExit(
-                               403,
-                               [
-                                       'title'       => L10n::t('Public access denied.'),
-                                       'description' => L10n::t('Only logged in users are permitted to perform a probing.'),
-                               ],
-                       );
-                       exit();
+                       $e = new \Friendica\Network\HTTPException\ForbiddenException(L10n::t("Only logged in users are permitted to perform a probing."));
+                       $e->httpdesc = L10n::t("Public access denied.");
+                       throw $e;
                }
-       }
 
-       public static function content()
-       {
                $app = self::getApp();
 
                $addr = defaults($_GET, 'addr', '');