]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/NodeInfo.php
Merge pull request #7973 from tobiasd/2019.12-CHANGELOG
[friendica.git] / src / Module / NodeInfo.php
index a4bc9be2b4205bacef7742131e144716d567a41f..8e3692e3d37cfe1a9897f9ddb4a77ece1ef83714 100644 (file)
@@ -17,12 +17,7 @@ class NodeInfo extends BaseModule
        {
                $app = self::getApp();
 
-               // @TODO: Replace with parameter from router
-               // if the first argument is ".well-known", print the well-known text
-               if (($app->argc > 1) && ($app->argv[0] == '.well-known')) {
-                       self::printWellKnown($app);
-               // otherwise print the nodeinfo
-               } elseif ($parameters['version'] == '1.0') {
+               if ($parameters['version'] == '1.0') {
                        self::printNodeInfo1($app);
                } elseif ($parameters['version'] == '2.0') {
                        self::printNodeInfo2($app);
@@ -31,29 +26,6 @@ class NodeInfo extends BaseModule
                }
        }
 
-       /**
-        * Prints the well-known nodeinfo redirect
-        *
-        * @param App $app
-        *
-        * @throws \Friendica\Network\HTTPException\NotFoundException
-        */
-       private static function printWellKnown(App $app)
-       {
-               $nodeinfo = [
-                       'links' => [
-                               ['rel'  => 'http://nodeinfo.diaspora.software/ns/schema/1.0',
-                               'href' => $app->getBaseURL() . '/nodeinfo/1.0'],
-                               ['rel'  => 'http://nodeinfo.diaspora.software/ns/schema/2.0',
-                               'href' => $app->getBaseURL() . '/nodeinfo/2.0'],
-                       ]
-               ];
-
-               header('Content-type: application/json; charset=utf-8');
-               echo json_encode($nodeinfo, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
-               exit;
-       }
-
        /**
         * Return the supported services
         *
@@ -154,7 +126,7 @@ class NodeInfo extends BaseModule
                $nodeinfo = [
                        'version'           => '1.0',
                        'software'          => [
-                               'name'    => 'friendica',
+                               'name'    => 'Friendica',
                                'version' => FRIENDICA_VERSION . '-' . DB_UPDATE_VERSION,
                        ],
                        'protocols'         => [
@@ -219,7 +191,7 @@ class NodeInfo extends BaseModule
                $nodeinfo = [
                        'version'           => '2.0',
                        'software'          => [
-                               'name'    => 'friendica',
+                               'name'    => 'Friendica',
                                'version' => FRIENDICA_VERSION . '-' . DB_UPDATE_VERSION,
                        ],
                        'protocols'         => ['dfrn', 'activitypub'],