mirror of
https://github.com/friendica/friendica
synced 2025-04-26 19:10:11 +00:00
Use gsid for the network name
This commit is contained in:
parent
d44641e58c
commit
d3de2497bc
6 changed files with 22 additions and 7 deletions
|
@ -184,7 +184,7 @@ class ContactSelector
|
|||
* @return string
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function networkToIcon($network, $profile = "")
|
||||
public static function networkToIcon($network, $profile = "", $gsid = 0)
|
||||
{
|
||||
$nets = [
|
||||
Protocol::DFRN => 'friendica',
|
||||
|
@ -218,7 +218,14 @@ class ContactSelector
|
|||
$network_icon = str_replace($search, $replace, $network);
|
||||
|
||||
if ((in_array($network, Protocol::FEDERATED)) && ($profile != "")) {
|
||||
$gserver = self::getServerForProfile($profile);
|
||||
if (!empty($gsid) && !empty(self::$serverdata[$gsid])) {
|
||||
$gserver = self::$serverdata[$gsid];
|
||||
} elseif (!empty($gsid)) {
|
||||
$gserver = DBA::selectFirst('gserver', ['platform', 'network'], ['id' => $gsid]);
|
||||
self::$serverdata[$gsid] = $gserver;
|
||||
} else {
|
||||
$gserver = self::getServerForProfile($profile);
|
||||
}
|
||||
if (!empty($gserver['platform'])) {
|
||||
$network_icon = $platform_icons[strtolower($gserver['platform'])] ?? $network_icon;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue