X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FContactSelector.php;h=ee6fcfa062736f0f342598914ee480cba7737fe2;hb=a8402109b183e81dad4e5443883dd292df094b86;hp=faba6269fe9fcdcaf73215ae1056c1156e4be954;hpb=0a4119adaf6294bf43d135a0f435c1dd677c50e0;p=friendica.git diff --git a/src/Content/ContactSelector.php b/src/Content/ContactSelector.php index faba6269fe..ee6fcfa062 100644 --- a/src/Content/ContactSelector.php +++ b/src/Content/ContactSelector.php @@ -1,13 +1,30 @@ . + * */ + namespace Friendica\Content; use Friendica\Core\Hook; -use Friendica\Core\L10n; use Friendica\Core\Protocol; use Friendica\Database\DBA; +use Friendica\DI; use Friendica\Util\Network; use Friendica\Util\Strings; @@ -16,51 +33,27 @@ use Friendica\Util\Strings; */ class ContactSelector { - /** - * @param string $current current - * @param string $foreign_net network - * @return string - * @throws \Exception - */ - public static function profileAssign($current, $foreign_net) - { - $o = ''; - - $disabled = (($foreign_net) ? ' disabled="true" ' : ''); - - $o .= "\r\n"; - return $o; - } + static $serverdata = []; + static $server_url = []; /** * @param string $current current * @param boolean $disabled optional, default false - * @return object + * @return string */ - public static function pollInterval($current, $disabled = false) + public static function pollInterval(string $current, bool $disabled = false): string { $dis = (($disabled) ? ' disabled="disabled" ' : ''); $o = ''; $o .= ""; - foreach ($select as $neutral => $selection) { - if ($selection !== 'NOTRANSLATION') { - $selected = (($neutral == $current) ? ' selected="selected" ' : ''); - $o .= ""; - } - } - $o .= ''; - return $o; - } - - /** - * @param string $current optional, default empty - * @param string $suffix optionsl, default empty - * @return string - * @throws \Friendica\Network\HTTPException\InternalServerErrorException - */ - public static function sexualPreference($current = "", $suffix = "") - { - $o = ''; - $select = [ - '' => L10n::t('No answer'), - 'Males' => L10n::t('Males'), - 'Females' => L10n::t('Females'), - 'Gay' => L10n::t('Gay'), - 'Lesbian' => L10n::t('Lesbian'), - 'No Preference' => L10n::t('No Preference'), - 'Bisexual' => L10n::t('Bisexual'), - 'Autosexual' => L10n::t('Autosexual'), - 'Abstinent' => L10n::t('Abstinent'), - 'Virgin' => L10n::t('Virgin'), - 'Deviant' => L10n::t('Deviant'), - 'Fetish' => L10n::t('Fetish'), - 'Oodles' => L10n::t('Oodles'), - 'Nonsexual' => L10n::t('Nonsexual'), - ]; - - Hook::callAll('sexpref_selector', $select); - - $o .= "'; - return $o; - } - - /** - * @param string $current optional, default empty - * @return string - * @throws \Friendica\Network\HTTPException\InternalServerErrorException - */ - public static function maritalStatus($current = "") - { - $o = ''; - $select = [ - '' => L10n::t('No answer'), - 'Single' => L10n::t('Single'), - 'Lonely' => L10n::t('Lonely'), - 'In a relation' => L10n::t('In a relation'), - 'Has crush' => L10n::t('Has crush'), - 'Infatuated' => L10n::t('Infatuated'), - 'Dating' => L10n::t('Dating'), - 'Unfaithful' => L10n::t('Unfaithful'), - 'Sex Addict' => L10n::t('Sex Addict'), - 'Friends' => L10n::t('Friends'), - 'Friends/Benefits' => L10n::t('Friends/Benefits'), - 'Casual' => L10n::t('Casual'), - 'Engaged' => L10n::t('Engaged'), - 'Married' => L10n::t('Married'), - 'Imaginarily married' => L10n::t('Imaginarily married'), - 'Partners' => L10n::t('Partners'), - 'Cohabiting' => L10n::t('Cohabiting'), - 'Common law' => L10n::t('Common law'), - 'Happy' => L10n::t('Happy'), - 'Not looking' => L10n::t('Not looking'), - 'Swinger' => L10n::t('Swinger'), - 'Betrayed' => L10n::t('Betrayed'), - 'Separated' => L10n::t('Separated'), - 'Unstable' => L10n::t('Unstable'), - 'Divorced' => L10n::t('Divorced'), - 'Imaginarily divorced' => L10n::t('Imaginarily divorced'), - 'Widowed' => L10n::t('Widowed'), - 'Uncertain' => L10n::t('Uncertain'), - 'It\'s complicated' => L10n::t('It\'s complicated'), - 'Don\'t care' => L10n::t('Don\'t care'), - 'Ask me' => L10n::t('Ask me'), - ]; - - Hook::callAll('marital_selector', $select); - - $o .= ''; - return $o; - } }