<?php
/**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
}
/**
+ * Determines network name
+ *
* @param string $network network of the contact
* @param string $profile optional, default empty
* @param string $protocol (Optional) Protocol that is used for the transmission
- * @param int $gsid ??? (@TODO)
+ * @param int $gsid Server id
* @return string
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
- public static function networkToName(string $network, string $profile = '', string $protocol = '', int $gsid = 0): string
+ public static function networkToName(string $network, string $profile = '', string $protocol = '', int $gsid = null): string
{
$nets = [
Protocol::DFRN => DI::l10n()->t('DFRN'),
Protocol::STATUSNET => DI::l10n()->t('GNU Social Connector'),
Protocol::ACTIVITYPUB => DI::l10n()->t('ActivityPub'),
Protocol::PNUT => DI::l10n()->t('pnut'),
+ Protocol::TUMBLR => DI::l10n()->t('Tumblr'),
+ Protocol::BLUESKY => DI::l10n()->t('Bluesky'),
];
Hook::callAll('network_to_name', $nets);
}
/**
+ * Determines network's icon name
+ *
* @param string $network network
* @param string $profile optional, default empty
- * @param int $gsid ??? (@TODO)
- * @return string
+ * @param int $gsid Server id
+ * @return string Name for network icon
* @throws \Exception
*/
- public static function networkToIcon(string $network, string $profile = "", int $gsid = 0): string
+ public static function networkToIcon(string $network, string $profile = "", int $gsid = null): string
{
$nets = [
Protocol::DFRN => 'friendica',
Protocol::STATUSNET => 'gnu-social',
Protocol::ACTIVITYPUB => 'activitypub',
Protocol::PNUT => 'file-text-o', /// @todo
+ Protocol::TUMBLR => 'tumblr',
+ Protocol::BLUESKY => 'circle', /// @todo
];
$platform_icons = ['diaspora' => 'diaspora', 'friendica' => 'friendica', 'friendika' => 'friendica',
'GNU Social' => 'gnu-social', 'gnusocial' => 'gnu-social', 'hubzilla' => 'hubzilla',
'mastodon' => 'mastodon', 'peertube' => 'peertube', 'pixelfed' => 'pixelfed',
'pleroma' => 'pleroma', 'red' => 'hubzilla', 'redmatrix' => 'hubzilla',
- 'socialhome' => 'social-home', 'wordpress' => 'wordpress'];
+ 'socialhome' => 'social-home', 'wordpress' => 'wordpress', 'lemmy' => 'users'];
$search = array_keys($nets);
$replace = array_values($nets);