]> git.mxchange.org Git - friendica.git/commitdiff
Added original keys to sexual preference
authorJeroen De Meerleer <me@jeroened.be>
Sun, 9 Sep 2018 14:23:37 +0000 (16:23 +0200)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 21 Jan 2019 13:40:43 +0000 (08:40 -0500)
src/Content/ContactSelector.php

index 9de8b5fb7f334059c04da14816ccb3e2f54e719b..8ebf11babdcf835ffc229e8c5ae02538402a7d4e 100644 (file)
@@ -181,16 +181,27 @@ class ContactSelector
        public static function sexualPreference($current = "", $suffix = "")
        {
                $o = '';
-               $select = ['', L10n::t('Males'), L10n::t('Females'), L10n::t('Gay'), L10n::t('Lesbian'), L10n::t('No Preference'), L10n::t('Bisexual'), L10n::t('Autosexual'), L10n::t('Abstinent'), L10n::t('Virgin'), L10n::t('Deviant'), L10n::t('Fetish'), L10n::t('Oodles'), L10n::t('Nonsexual')];
-
+               $select['Males'] = L10n::t('Males');
+               $select['Females'] = L10n::t('Females');
+               $select['Gay'] = L10n::t('Gay');
+               $select['Lesbian'] = L10n::t('Lesbian');
+               $select['No Preference'] = L10n::t('No Preference');
+               $select['Bisexual'] = L10n::t('Bisexual');
+               $select['Autosexual'] = L10n::t('Autosexual');
+               $select['Abstinent'] = L10n::t('Abstinent');
+               $select['Virgin'] = L10n::t('Virgin');
+               $select['Deviant'] = L10n::t('Deviant');
+               $select['Fetish'] = L10n::t('Fetish');
+               $select['Oodles'] = L10n::t('Oodles');
+               $select['Nonsexual'] = L10n::t('Nonsexual');
 
                Addon::callHooks('sexpref_selector', $select);
 
                $o .= "<select name=\"sexual$suffix\" id=\"sexual-select$suffix\" size=\"1\" >";
-               foreach ($select as $selection) {
+               foreach ($select as $neutral => $selection) {
                        if ($selection !== 'NOTRANSLATION') {
                                $selected = (($selection == $current) ? ' selected="selected" ' : '');
-                               $o .= "<option value=\"$selection\" $selected >$selection</option>";
+                               $o .= "<option value=\"$neutral\" $selected >$selection</option>";
                        }
                }
                $o .= '</select>';