X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FContactSelector.php;h=9035d37e73c01d3c838e35c30bbc662e1507acc0;hb=e0295abdabe23476f326621e0321ef826756f53e;hp=817602f1eb86ed653d780c17cc193ca3988f9c96;hpb=fdaac8a681b683f35ca1f7fd407bf2f28be6f7b8;p=friendica.git diff --git a/src/Content/ContactSelector.php b/src/Content/ContactSelector.php index 817602f1eb..9035d37e73 100644 --- a/src/Content/ContactSelector.php +++ b/src/Content/ContactSelector.php @@ -1,52 +1,45 @@ . + * */ + 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; /** - * @brief ContactSelector class + * ContactSelector class */ 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) { @@ -55,12 +48,12 @@ class ContactSelector $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; - } }