mirror of
https://github.com/friendica/friendica
synced 2025-04-26 19:10:11 +00:00
Additionally display the protocol together with the network
This commit is contained in:
parent
6fa1dfa86a
commit
c037e9143c
6 changed files with 18 additions and 13 deletions
|
@ -105,12 +105,13 @@ class ContactSelector
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $network network
|
||||
* @param string $profile optional, default empty
|
||||
* @param string $network network
|
||||
* @param string $profile optional, default empty
|
||||
* @param string $protocol optional, default empty
|
||||
* @return string
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function networkToName($network, $profile = "")
|
||||
public static function networkToName($network, $profile = '', $protocol = '')
|
||||
{
|
||||
$nets = [
|
||||
Protocol::DFRN => L10n::t('DFRN'),
|
||||
|
@ -162,6 +163,10 @@ class ContactSelector
|
|||
}
|
||||
}
|
||||
|
||||
if (!empty($protocol) && ($protocol != $network)) {
|
||||
$networkname = L10n::t('%s (via %s)', $networkname, self::networkToName($protocol));
|
||||
}
|
||||
|
||||
return $networkname;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue