]> git.mxchange.org Git - friendica.git/commitdiff
Changes:
authorRoland Häder <roland@mxchange.org>
Thu, 15 Sep 2022 00:29:46 +0000 (02:29 +0200)
committerRoland Häder <roland@mxchange.org>
Wed, 17 Jan 2024 00:03:00 +0000 (01:03 +0100)
- Parameter `$nodeinfo_url` was no longer present, instead an instance of
  `ICanHandleHttpResponses` is now given (documentation updated)
- sorted a bit setting array values

src/Model/GServer.php

index e40442384a35e6ef4b01fa638fd150ab4e0a49f1..a3f0c26077ecfd5718dc655f751d428988aa0ed6 100644 (file)
@@ -151,7 +151,6 @@ class GServer
         * @param string $pattern
         *
         * @return array
-        *
         * @throws Exception
         */
        public static function listByDomainPattern(string $pattern): array
@@ -277,7 +276,6 @@ class GServer
         * @param bool $undetected
         *
         * @return string
-        *
         * @throws Exception
         */
        public static function getNextUpdateDate(bool $success, string $created = '', string $last_contact = '', bool $undetected = false): string
@@ -784,6 +782,9 @@ class GServer
                }
 
                $serverdata['registered-users'] = $serverdata['registered-users'] ?? 0;
+               $serverdata['next_contact'] = self::getNextUpdateDate(true, '', '', in_array($serverdata['network'], [Protocol::PHANTOM, Protocol::FEED]));
+               $serverdata['last_contact'] = DateTimeFormat::utcNow();
+               $serverdata['failed'] = false;
 
                // Numbers above a reasonable value (10 millions) are ignored
                if ($serverdata['registered-users'] > 10000000) {
@@ -860,7 +861,6 @@ class GServer
         * @param string $server_url address of the server
         *
         * @return void
-        *
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
        private static function discoverRelay(string $server_url)
@@ -1317,12 +1317,10 @@ class GServer
        /**
         * Parses NodeInfo2 protocol 1.0
         *
-        * @see https://github.com/jaywink/nodeinfo2/blob/master/PROTOCOL.md
-        *
-        * @param string $nodeinfo_url address of the nodeinfo path
+        * @param ICanHandleHttpResponses $httpResult
         *
         * @return array Server data
-        *
+        * @see https://github.com/jaywink/nodeinfo2/blob/master/PROTOCOL.md
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
        private static function parseNodeinfo210(ICanHandleHttpResponses $httpResult): array