From: Philipp Holzer Date: Sun, 19 May 2019 01:02:58 +0000 (+0200) Subject: Renamed Diagnostic to Debug and deleted ItemSource (already defined) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=492d7abe928c63d62ee9794aa5ff23ec374aece9;p=friendica.git Renamed Diagnostic to Debug and deleted ItemSource (already defined) --- diff --git a/src/App/Router.php b/src/App/Router.php index ddb3dbdfe4..ecc4eed688 100644 --- a/src/App/Router.php +++ b/src/App/Router.php @@ -92,7 +92,7 @@ class Router $this->routeCollector->addRoute(['GET'], '/allfriends/{id:\d+}', Module\AllFriends::class); $this->routeCollector->addRoute(['GET'], '/apps', Module\Apps::class); $this->routeCollector->addRoute(['GET'], '/attach/{item:\d+}', Module\Attach::class); - $this->routeCollector->addRoute(['GET'], '/babel', Module\Diagnostic\Babel::class); + $this->routeCollector->addRoute(['GET'], '/babel', Module\Debug\Babel::class); $this->routeCollector->addRoute(['GET'], '/bookmarklet', Module\Bookmarklet::class); $this->routeCollector->addGroup('/contact', function (RouteCollector $collector) { $collector->addRoute(['GET'], '[/]', Module\Contact::class); @@ -121,7 +121,7 @@ class Router $collector->addRoute(['GET'], '/{nickname}/replies', Module\Feed::class); $collector->addRoute(['GET'], '/{nickname}/activity', Module\Feed::class); }); - $this->routeCollector->addRoute(['GET'], '/feedtest', Module\Feedtest::class); + $this->routeCollector->addRoute(['GET'], '/feedtest', Module\Debug\Feed::class); $this->routeCollector->addGroup('/fetch', function (RouteCollector $collector) { $collector->addRoute(['GET'], '/{guid}/post', Module\Diaspora\Fetch::class); $collector->addRoute(['GET'], '/{guid}/status_message', Module\Diaspora\Fetch::class); @@ -153,9 +153,8 @@ class Router $collector->addRoute(['GET', 'POST'], '[/]', Module\Install::class); $collector->addRoute(['GET'], '/testrewrite', Module\Install::class); }); - $this->routeCollector->addRoute(['GET', 'POST'], '/itemsource[/{guid}]', Module\Diagnostic\ItemSource::class); $this->routeCollector->addRoute(['GET'], '/like/{item:\d+}', Module\Like::class); - $this->routeCollector->addRoute(['GET', 'POST'], '/localtime', Module\Diagnostic\Localtime::class); + $this->routeCollector->addRoute(['GET', 'POST'], '/localtime', Module\Debug\Localtime::class); $this->routeCollector->addRoute(['GET', 'POST'], '/login', Module\Login::class); $this->routeCollector->addRoute(['GET', 'POST'], '/logout', Module\Logout::class); $this->routeCollector->addRoute(['GET'], '/magic', Module\Magic::class); @@ -185,7 +184,7 @@ class Router $collector->addRoute(['GET'], '/{type}/{customize}/{name}', Module\Photo::class); }); $this->routeCollector->addRoute(['GET'], '/pretheme', Module\ThemeDetails::class); - $this->routeCollector->addRoute(['GET'], '/probe', Module\Diagnostic\Probe::class); + $this->routeCollector->addRoute(['GET'], '/probe', Module\Debug\Probe::class); $this->routeCollector->addGroup('/profile', function (RouteCollector $collector) { $collector->addRoute(['GET'], '/{nickname}', Module\Profile::class); $collector->addRoute(['GET'], '/{profile:\d+}/view', Module\Profile::class); @@ -214,8 +213,8 @@ class Router $this->routeCollector->addRoute(['GET'], '/toggle_mobile', Module\ToggleMobile::class); $this->routeCollector->addRoute(['GET'], '/tos', Module\Tos::class); $this->routeCollector->addRoute(['GET'], '/view/theme/{theme}/style.pcss', Module\Theme::class); - $this->routeCollector->addRoute(['GET'], '/viewsrc/{item:\d+}', Module\Diagnostic\ItemBody::class); - $this->routeCollector->addRoute(['GET'], '/webfinger', Module\Diagnostic\WebFinger::class); + $this->routeCollector->addRoute(['GET'], '/viewsrc/{item:\d+}', Module\Debug\ItemBody::class); + $this->routeCollector->addRoute(['GET'], '/webfinger', Module\Debug\WebFinger::class); $this->routeCollector->addRoute(['GET'], '/xrd', Module\Xrd::class); } diff --git a/src/Module/Debug/Babel.php b/src/Module/Debug/Babel.php new file mode 100644 index 0000000000..899c8033c4 --- /dev/null +++ b/src/Module/Debug/Babel.php @@ -0,0 +1,175 @@ +', $s); + } + + $results = []; + if (!empty($_REQUEST['text'])) { + switch (defaults($_REQUEST, 'type', 'bbcode')) { + case 'bbcode': + $bbcode = trim($_REQUEST['text']); + $results[] = [ + 'title' => L10n::t('Source input'), + 'content' => visible_whitespace($bbcode) + ]; + + $plain = Text\BBCode::toPlaintext($bbcode, false); + $results[] = [ + 'title' => L10n::t('BBCode::toPlaintext'), + 'content' => visible_whitespace($plain) + ]; + + $html = Text\BBCode::convert($bbcode); + $results[] = [ + 'title' => L10n::t('BBCode::convert (raw HTML)'), + 'content' => visible_whitespace(htmlspecialchars($html)) + ]; + + $results[] = [ + 'title' => L10n::t('BBCode::convert'), + 'content' => $html + ]; + + $bbcode2 = Text\HTML::toBBCode($html); + $results[] = [ + 'title' => L10n::t('BBCode::convert => HTML::toBBCode'), + 'content' => visible_whitespace($bbcode2) + ]; + + $markdown = Text\BBCode::toMarkdown($bbcode); + $results[] = [ + 'title' => L10n::t('BBCode::toMarkdown'), + 'content' => visible_whitespace($markdown) + ]; + + $html2 = Text\Markdown::convert($markdown); + $results[] = [ + 'title' => L10n::t('BBCode::toMarkdown => Markdown::convert'), + 'content' => $html2 + ]; + + $bbcode3 = Text\Markdown::toBBCode($markdown); + $results[] = [ + 'title' => L10n::t('BBCode::toMarkdown => Markdown::toBBCode'), + 'content' => visible_whitespace($bbcode3) + ]; + + $bbcode4 = Text\HTML::toBBCode($html2); + $results[] = [ + 'title' => L10n::t('BBCode::toMarkdown => Markdown::convert => HTML::toBBCode'), + 'content' => visible_whitespace($bbcode4) + ]; + + $item = [ + 'body' => $bbcode, + 'tag' => '', + ]; + + Item::setHashtags($item); + $results[] = [ + 'title' => L10n::t('Item Body'), + 'content' => visible_whitespace($item['body']) + ]; + $results[] = [ + 'title' => L10n::t('Item Tags'), + 'content' => $item['tag'] + ]; + break; + case 'markdown': + $markdown = trim($_REQUEST['text']); + $results[] = [ + 'title' => L10n::t('Source input (Diaspora format)'), + 'content' => '
' . $markdown . '
' + ]; + + $html = Text\Markdown::convert($markdown); + $results[] = [ + 'title' => L10n::t('Markdown::convert (raw HTML)'), + 'content' => visible_whitespace(htmlspecialchars($html)) + ]; + + $results[] = [ + 'title' => L10n::t('Markdown::convert'), + 'content' => $html + ]; + + $bbcode = Text\Markdown::toBBCode($markdown); + $results[] = [ + 'title' => L10n::t('Markdown::toBBCode'), + 'content' => '
' . $bbcode . '
' + ]; + break; + case 'html' : + $html = trim($_REQUEST['text']); + $results[] = [ + 'title' => L10n::t('Raw HTML input'), + 'content' => htmlspecialchars($html) + ]; + + $results[] = [ + 'title' => L10n::t('HTML Input'), + 'content' => $html + ]; + + $bbcode = Text\HTML::toBBCode($html); + $results[] = [ + 'title' => L10n::t('HTML::toBBCode'), + 'content' => visible_whitespace($bbcode) + ]; + + $html2 = Text\BBCode::convert($bbcode); + $results[] = [ + 'title' => L10n::t('HTML::toBBCode => BBCode::convert'), + 'content' => $html2 + ]; + + $results[] = [ + 'title' => L10n::t('HTML::toBBCode => BBCode::convert (raw HTML)'), + 'content' => htmlspecialchars($html2) + ]; + + $markdown = Text\HTML::toMarkdown($html); + $results[] = [ + 'title' => L10n::t('HTML::toMarkdown'), + 'content' => visible_whitespace($markdown) + ]; + + $text = Text\HTML::toPlaintext($html); + $results[] = [ + 'title' => L10n::t('HTML::toPlaintext'), + 'content' => '
' . $text . '
' + ]; + } + } + + $tpl = Renderer::getMarkupTemplate('babel.tpl'); + $o = Renderer::replaceMacros($tpl, [ + '$text' => ['text', L10n::t('Source text'), defaults($_REQUEST, 'text', ''), ''], + '$type_bbcode' => ['type', L10n::t('BBCode'), 'bbcode', '', defaults($_REQUEST, 'type', 'bbcode') == 'bbcode'], + '$type_markdown' => ['type', L10n::t('Markdown'), 'markdown', '', defaults($_REQUEST, 'type', 'bbcode') == 'markdown'], + '$type_html' => ['type', L10n::t('HTML'), 'html', '', defaults($_REQUEST, 'type', 'bbcode') == 'html'], + '$results' => $results + ]); + + return $o; + } +} diff --git a/src/Module/Debug/Feed.php b/src/Module/Debug/Feed.php new file mode 100644 index 0000000000..a11df59b79 --- /dev/null +++ b/src/Module/Debug/Feed.php @@ -0,0 +1,53 @@ +internalRedirect(); + } + } + + public static function content() + { + $result = []; + if (!empty($_REQUEST['url'])) { + $url = $_REQUEST['url']; + + $importer = Model\User::getById(local_user()); + + $contact_id = Model\Contact::getIdForURL($url, local_user(), true); + $contact = Model\Contact::getById($contact_id); + + $xml = Network::fetchUrl($contact['poll']); + + $dummy = null; + $import_result = Protocol\Feed::import($xml, $importer, $contact, $dummy, true); + + $result = [ + 'input' => $xml, + 'output' => var_export($import_result, true), + ]; + } + + $tpl = Renderer::getMarkupTemplate('feedtest.tpl'); + return Renderer::replaceMacros($tpl, [ + '$url' => ['url', L10n::t('Source URL'), defaults($_REQUEST, 'url', ''), ''], + '$result' => $result + ]); + } +} diff --git a/src/Module/Debug/ItemBody.php b/src/Module/Debug/ItemBody.php new file mode 100644 index 0000000000..fead255358 --- /dev/null +++ b/src/Module/Debug/ItemBody.php @@ -0,0 +1,43 @@ +argc > 1) ? intval($app->argv[1]) : 0); + + if (!$itemId) { + throw new HTTPException\NotFoundException(L10n::t('Item not found.')); + } + + $item = Item::selectFirst(['body'], ['uid' => local_user(), 'id' => $itemId]); + + if (!empty($item)) { + if ($app->isAjax()) { + echo str_replace("\n", '
', $item['body']); + exit(); + } else { + return str_replace("\n", '
', $item['body']); + } + } else { + throw new HTTPException\NotFoundException(L10n::t('Item not found.')); + } + } +} diff --git a/src/Module/Debug/Localtime.php b/src/Module/Debug/Localtime.php new file mode 100644 index 0000000000..36eaa17ac8 --- /dev/null +++ b/src/Module/Debug/Localtime.php @@ -0,0 +1,49 @@ +data['mod-localtime'] = DateTimeFormat::convert($time, $_POST['timezone'], 'UTC', $bd_format); + } + } + + public static function content() + { + $app = self::getApp(); + + $time = defaults($_REQUEST, 'time', 'now'); + + $output = '

' . L10n::t('Time Conversion') . '

'; + $output .= '

' . L10n::t('Friendica provides this service for sharing events with other networks and friends in unknown timezones.') . '

'; + $output .= '

' . L10n::t('UTC time: %s', $time) . '

'; + + if (!empty($_REQUEST['timezone'])) { + $output .= '

' . L10n::t('Current timezone: %s', $_REQUEST['timezone']) . '

'; + } + + if (!empty($app->data['mod-localtime'])) { + $output .= '

' . L10n::t('Converted localtime: %s', $app->data['mod-localtime']) . '

'; + } + + $output .= '
'; + $output .= '

' . L10n::t('Please select your timezone:') . '

'; + $output .= Temporal::getTimezoneSelect(defaults($_REQUEST, 'timezone', Installer::DEFAULT_TZ)); + $output .= '
'; + + return $output; + } +} diff --git a/src/Module/Debug/Probe.php b/src/Module/Debug/Probe.php new file mode 100644 index 0000000000..f29f3b3bb7 --- /dev/null +++ b/src/Module/Debug/Probe.php @@ -0,0 +1,43 @@ +httpdesc = L10n::t('Public access denied.'); + throw $e; + } + + $addr = defaults($_GET, 'addr', ''); + $res = ''; + + if (!empty($addr)) { + $res = NetworkProbe::uri($addr, '', 0, false); + $res = print_r($res, true); + } + + $tpl = Renderer::getMarkupTemplate('probe.tpl'); + return Renderer::replaceMacros($tpl, [ + '$addr' => ['addr', + L10n::t('Lookup address'), + $addr, + '', + 'required' + ], + '$res' => $res, + ]); + } +} diff --git a/src/Module/Debug/WebFinger.php b/src/Module/Debug/WebFinger.php new file mode 100644 index 0000000000..2b0b9c53b4 --- /dev/null +++ b/src/Module/Debug/WebFinger.php @@ -0,0 +1,37 @@ +httpdesc = L10n::t('Public access denied.'); + throw $e; + } + + $addr = defaults($_GET, 'addr', ''); + $res = ''; + + if (!empty($addr)) { + $res = Probe::lrdd($addr); + $res = print_r($res, true); + } + + $tpl = Renderer::getMarkupTemplate('webfinger.tpl'); + return Renderer::replaceMacros($tpl, [ + '$addr' => $addr, + '$res' => $res, + ]); + } +} diff --git a/src/Module/Diagnostic/Babel.php b/src/Module/Diagnostic/Babel.php deleted file mode 100644 index 797584a4f7..0000000000 --- a/src/Module/Diagnostic/Babel.php +++ /dev/null @@ -1,175 +0,0 @@ -', $s); - } - - $results = []; - if (!empty($_REQUEST['text'])) { - switch (defaults($_REQUEST, 'type', 'bbcode')) { - case 'bbcode': - $bbcode = trim($_REQUEST['text']); - $results[] = [ - 'title' => L10n::t('Source input'), - 'content' => visible_whitespace($bbcode) - ]; - - $plain = Text\BBCode::toPlaintext($bbcode, false); - $results[] = [ - 'title' => L10n::t('BBCode::toPlaintext'), - 'content' => visible_whitespace($plain) - ]; - - $html = Text\BBCode::convert($bbcode); - $results[] = [ - 'title' => L10n::t('BBCode::convert (raw HTML)'), - 'content' => visible_whitespace(htmlspecialchars($html)) - ]; - - $results[] = [ - 'title' => L10n::t('BBCode::convert'), - 'content' => $html - ]; - - $bbcode2 = Text\HTML::toBBCode($html); - $results[] = [ - 'title' => L10n::t('BBCode::convert => HTML::toBBCode'), - 'content' => visible_whitespace($bbcode2) - ]; - - $markdown = Text\BBCode::toMarkdown($bbcode); - $results[] = [ - 'title' => L10n::t('BBCode::toMarkdown'), - 'content' => visible_whitespace($markdown) - ]; - - $html2 = Text\Markdown::convert($markdown); - $results[] = [ - 'title' => L10n::t('BBCode::toMarkdown => Markdown::convert'), - 'content' => $html2 - ]; - - $bbcode3 = Text\Markdown::toBBCode($markdown); - $results[] = [ - 'title' => L10n::t('BBCode::toMarkdown => Markdown::toBBCode'), - 'content' => visible_whitespace($bbcode3) - ]; - - $bbcode4 = Text\HTML::toBBCode($html2); - $results[] = [ - 'title' => L10n::t('BBCode::toMarkdown => Markdown::convert => HTML::toBBCode'), - 'content' => visible_whitespace($bbcode4) - ]; - - $item = [ - 'body' => $bbcode, - 'tag' => '', - ]; - - Item::setHashtags($item); - $results[] = [ - 'title' => L10n::t('Item Body'), - 'content' => visible_whitespace($item['body']) - ]; - $results[] = [ - 'title' => L10n::t('Item Tags'), - 'content' => $item['tag'] - ]; - break; - case 'markdown': - $markdown = trim($_REQUEST['text']); - $results[] = [ - 'title' => L10n::t('Source input (Diaspora format)'), - 'content' => '
' . $markdown . '
' - ]; - - $html = Text\Markdown::convert($markdown); - $results[] = [ - 'title' => L10n::t('Markdown::convert (raw HTML)'), - 'content' => visible_whitespace(htmlspecialchars($html)) - ]; - - $results[] = [ - 'title' => L10n::t('Markdown::convert'), - 'content' => $html - ]; - - $bbcode = Text\Markdown::toBBCode($markdown); - $results[] = [ - 'title' => L10n::t('Markdown::toBBCode'), - 'content' => '
' . $bbcode . '
' - ]; - break; - case 'html' : - $html = trim($_REQUEST['text']); - $results[] = [ - 'title' => L10n::t('Raw HTML input'), - 'content' => htmlspecialchars($html) - ]; - - $results[] = [ - 'title' => L10n::t('HTML Input'), - 'content' => $html - ]; - - $bbcode = Text\HTML::toBBCode($html); - $results[] = [ - 'title' => L10n::t('HTML::toBBCode'), - 'content' => visible_whitespace($bbcode) - ]; - - $html2 = Text\BBCode::convert($bbcode); - $results[] = [ - 'title' => L10n::t('HTML::toBBCode => BBCode::convert'), - 'content' => $html2 - ]; - - $results[] = [ - 'title' => L10n::t('HTML::toBBCode => BBCode::convert (raw HTML)'), - 'content' => htmlspecialchars($html2) - ]; - - $markdown = Text\HTML::toMarkdown($html); - $results[] = [ - 'title' => L10n::t('HTML::toMarkdown'), - 'content' => visible_whitespace($markdown) - ]; - - $text = Text\HTML::toPlaintext($html); - $results[] = [ - 'title' => L10n::t('HTML::toPlaintext'), - 'content' => '
' . $text . '
' - ]; - } - } - - $tpl = Renderer::getMarkupTemplate('babel.tpl'); - $o = Renderer::replaceMacros($tpl, [ - '$text' => ['text', L10n::t('Source text'), defaults($_REQUEST, 'text', ''), ''], - '$type_bbcode' => ['type', L10n::t('BBCode'), 'bbcode', '', defaults($_REQUEST, 'type', 'bbcode') == 'bbcode'], - '$type_markdown' => ['type', L10n::t('Markdown'), 'markdown', '', defaults($_REQUEST, 'type', 'bbcode') == 'markdown'], - '$type_html' => ['type', L10n::t('HTML'), 'html', '', defaults($_REQUEST, 'type', 'bbcode') == 'html'], - '$results' => $results - ]); - - return $o; - } -} diff --git a/src/Module/Diagnostic/Feed.php b/src/Module/Diagnostic/Feed.php deleted file mode 100644 index c54431fce3..0000000000 --- a/src/Module/Diagnostic/Feed.php +++ /dev/null @@ -1,53 +0,0 @@ -internalRedirect(); - } - } - - public static function content() - { - $result = []; - if (!empty($_REQUEST['url'])) { - $url = $_REQUEST['url']; - - $importer = Model\User::getById(local_user()); - - $contact_id = Model\Contact::getIdForURL($url, local_user(), true); - $contact = Model\Contact::getById($contact_id); - - $xml = Network::fetchUrl($contact['poll']); - - $dummy = null; - $import_result = Protocol\Feed::import($xml, $importer, $contact, $dummy, true); - - $result = [ - 'input' => $xml, - 'output' => var_export($import_result, true), - ]; - } - - $tpl = Renderer::getMarkupTemplate('feedtest.tpl'); - return Renderer::replaceMacros($tpl, [ - '$url' => ['url', L10n::t('Source URL'), defaults($_REQUEST, 'url', ''), ''], - '$result' => $result - ]); - } -} diff --git a/src/Module/Diagnostic/ItemBody.php b/src/Module/Diagnostic/ItemBody.php deleted file mode 100644 index e4e45b7223..0000000000 --- a/src/Module/Diagnostic/ItemBody.php +++ /dev/null @@ -1,43 +0,0 @@ -argc > 1) ? intval($app->argv[1]) : 0); - - if (!$itemId) { - throw new HTTPException\NotFoundException(L10n::t('Item not found.')); - } - - $item = Item::selectFirst(['body'], ['uid' => local_user(), 'id' => $itemId]); - - if (!empty($item)) { - if ($app->isAjax()) { - echo str_replace("\n", '
', $item['body']); - exit(); - } else { - return str_replace("\n", '
', $item['body']); - } - } else { - throw new HTTPException\NotFoundException(L10n::t('Item not found.')); - } - } -} diff --git a/src/Module/Diagnostic/ItemSource.php b/src/Module/Diagnostic/ItemSource.php deleted file mode 100644 index bd580cf892..0000000000 --- a/src/Module/Diagnostic/ItemSource.php +++ /dev/null @@ -1,55 +0,0 @@ - - */ -class ItemSource extends \Friendica\BaseModule -{ - public static function content() - { - if (!is_site_admin()) { - return; - } - - $a = self::getApp(); - - // @TODO: Replace with parameter from router - if (!empty($a->argv[1])) { - $guid = $a->argv[1]; - } - - $guid = defaults($_REQUEST['guid'], $guid); - - $source = ''; - $item_uri = ''; - $item_id = ''; - $terms = []; - if (!empty($guid)) { - $item = Model\Item::selectFirst(['id', 'guid', 'uri'], ['guid' => $guid]); - - $conversation = Model\Conversation::getByItemUri($item['uri']); - - $item_id = $item['id']; - $item_uri = $item['uri']; - $source = $conversation['source']; - $terms = Model\Term::tagArrayFromItemId($item['id'], [Model\Term::HASHTAG, Model\Term::MENTION, Model\Term::IMPLICIT_MENTION]); - } - - $tpl = Renderer::getMarkupTemplate('debug/itemsource.tpl'); - $o = Renderer::replaceMacros($tpl, [ - '$guid' => ['guid', L10n::t('Item Guid'), $guid, ''], - '$source' => $source, - '$item_uri' => $item_uri, - '$item_id' => $item_id, - '$terms' => $terms, - ]); - - return $o; - } -} diff --git a/src/Module/Diagnostic/Localtime.php b/src/Module/Diagnostic/Localtime.php deleted file mode 100644 index a3870ca95e..0000000000 --- a/src/Module/Diagnostic/Localtime.php +++ /dev/null @@ -1,49 +0,0 @@ -data['mod-localtime'] = DateTimeFormat::convert($time, $_POST['timezone'], 'UTC', $bd_format); - } - } - - public static function content() - { - $app = self::getApp(); - - $time = defaults($_REQUEST, 'time', 'now'); - - $output = '

' . L10n::t('Time Conversion') . '

'; - $output .= '

' . L10n::t('Friendica provides this service for sharing events with other networks and friends in unknown timezones.') . '

'; - $output .= '

' . L10n::t('UTC time: %s', $time) . '

'; - - if (!empty($_REQUEST['timezone'])) { - $output .= '

' . L10n::t('Current timezone: %s', $_REQUEST['timezone']) . '

'; - } - - if (!empty($app->data['mod-localtime'])) { - $output .= '

' . L10n::t('Converted localtime: %s', $app->data['mod-localtime']) . '

'; - } - - $output .= '
'; - $output .= '

' . L10n::t('Please select your timezone:') . '

'; - $output .= Temporal::getTimezoneSelect(defaults($_REQUEST, 'timezone', Installer::DEFAULT_TZ)); - $output .= '
'; - - return $output; - } -} diff --git a/src/Module/Diagnostic/Probe.php b/src/Module/Diagnostic/Probe.php deleted file mode 100644 index 516c49411b..0000000000 --- a/src/Module/Diagnostic/Probe.php +++ /dev/null @@ -1,43 +0,0 @@ -httpdesc = L10n::t("Public access denied."); - throw $e; - } - - $addr = defaults($_GET, 'addr', ''); - $res = ''; - - if (!empty($addr)) { - $res = NetworkProbe::uri($addr, '', 0, false); - $res = print_r($res, true); - } - - $tpl = Renderer::getMarkupTemplate('probe.tpl'); - return Renderer::replaceMacros($tpl, [ - '$addr' => ['addr', - L10n::t('Lookup address'), - $addr, - '', - 'required' - ], - '$res' => $res, - ]); - } -} diff --git a/src/Module/Diagnostic/WebFinger.php b/src/Module/Diagnostic/WebFinger.php deleted file mode 100644 index 5d6e05a27d..0000000000 --- a/src/Module/Diagnostic/WebFinger.php +++ /dev/null @@ -1,37 +0,0 @@ -httpdesc = L10n::t("Public access denied."); - throw $e; - } - - $addr = defaults($_GET, 'addr', ''); - $res = ''; - - if (!empty($addr)) { - $res = Probe::lrdd($addr); - $res = print_r($res, true); - } - - $tpl = Renderer::getMarkupTemplate('webfinger.tpl'); - return Renderer::replaceMacros($tpl, [ - '$addr' => $addr, - '$res' => $res, - ]); - } -}