X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FContactSelector.php;h=7a36ea8c681be56a7ad77e9755402e2d96f76fce;hb=b852e5842bffcc1df1e5ac5d356fd9f19b7af499;hp=817602f1eb86ed653d780c17cc193ca3988f9c96;hpb=fdaac8a681b683f35ca1f7fd407bf2f28be6f7b8;p=friendica.git diff --git a/src/Content/ContactSelector.php b/src/Content/ContactSelector.php index 817602f1eb..7a36ea8c68 100644 --- a/src/Content/ContactSelector.php +++ b/src/Content/ContactSelector.php @@ -105,12 +105,13 @@ class ContactSelector } /** - * @param string $network network - * @param string $profile optional, default empty + * @param string $network network of the contact + * @param string $profile optional, default empty + * @param string $protocol (Optional) Protocol that is used for the transmission * @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; }