Merge pull request #11979 from annando/issue-11853

Notices
This commit is contained in:
Hypolite Petovan 2022-10-09 17:45:33 -04:00 committed by GitHub
commit a10f55bb85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -2164,12 +2164,14 @@ class GServer
if ($curlResult->isSuccess()) {
$servers = json_decode($curlResult->getBody(), true);
if (!empty($servers['instances'])) {
foreach ($servers['instances'] as $server) {
$url = (is_null($server['https_score']) ? 'http' : 'https') . '://' . $server['name'];
self::add($url);
}
}
}
}
DI::config()->set('poco', 'last_federation_discovery', time());
}

View File

@ -1131,6 +1131,8 @@ class ParseUrl
$content = JsonLD::fetchElement($jsonld, 'logo', 'url', '@type', 'ImageObject');
if (!empty($content) && is_string($content)) {
$jsonldinfo['publisher_img'] = trim($content);
} elseif (!empty($content) && is_array($content)) {
$jsonldinfo['publisher_img'] = trim($content[0]);
}
$content = JsonLD::fetchElement($jsonld, 'brand', 'name', '@type', 'Organization');