From: Roland Häder Date: Thu, 15 Sep 2022 00:29:46 +0000 (+0200) Subject: Changes: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3bca4fe2a64671d09e08346456cdfa6c12f996e9;p=friendica.git Changes: - Parameter `$nodeinfo_url` was no longer present, instead an instance of `ICanHandleHttpResponses` is now given (documentation updated) - sorted a bit setting array values --- diff --git a/src/Model/GServer.php b/src/Model/GServer.php index e40442384a..a3f0c26077 100644 --- a/src/Model/GServer.php +++ b/src/Model/GServer.php @@ -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