mirror of
https://github.com/friendica/friendica
synced 2025-04-25 07:50:10 +00:00
Improved server detection / new servers added to federation statistics (#13793)
* Improved server detection / new servers added to federation statistics * Fix wrong color code
This commit is contained in:
parent
bf80001c80
commit
9592292dba
4 changed files with 68 additions and 2 deletions
|
@ -1247,6 +1247,11 @@ class GServer
|
|||
}
|
||||
}
|
||||
|
||||
// Special treatment for NextCloud, since there you can freely define your software name
|
||||
if (!empty($nodeinfo['rootUrl']) && in_array(parse_url($nodeinfo['rootUrl'], PHP_URL_PATH), ['/index.php/apps/social', '/apps/social'])) {
|
||||
$server['platform'] = 'nextcloud';
|
||||
}
|
||||
|
||||
if (!empty($nodeinfo['metadata']['nodeName'])) {
|
||||
$server['site_name'] = $nodeinfo['metadata']['nodeName'];
|
||||
}
|
||||
|
@ -1565,7 +1570,7 @@ class GServer
|
|||
}
|
||||
|
||||
foreach ($tags as $tag) {
|
||||
if ((($tag['as:name'] ?? '') == 'Protocol') && (($tag['sc:value'] ?? '') == 'nomad')) {
|
||||
if ((($tag['as:name'] ?? '') == 'Protocol') && in_array('nomad', [$tag['sc:value'] ?? '', $tag['as:content'] ?? ''])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue