]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/ContactSelector.php
Remove usage of profile.gender
[friendica.git] / src / Content / ContactSelector.php
index 184707220f64a4aca5743749d8e5795f1db8cf4d..64a2b5be9e4f4b92182a1f277a5408c88f27e6b2 100644 (file)
@@ -7,6 +7,7 @@ namespace Friendica\Content;
 use Friendica\Core\Hook;
 use Friendica\Core\Protocol;
 use Friendica\Database\DBA;
+use Friendica\DI;
 use Friendica\Util\Network;
 use Friendica\Util\Strings;
 
@@ -15,33 +16,6 @@ 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 .= "<select id=\"contact-profile-selector\" class=\"form-control\" $disabled name=\"profile-assign\" >\r\n";
-
-               $s = DBA::select('profile', ['id', 'profile-name', 'is-default'], ['uid' => $_SESSION['uid']]);
-               $r = DBA::toArray($s);
-
-               if (DBA::isResult($r)) {
-                       foreach ($r as $rr) {
-                               $selected = (($rr['id'] == $current || ($current == 0 && $rr['is-default'] == 1)) ? " selected=\"selected\" " : "");
-                               $o .= "<option value=\"{$rr['id']}\" $selected >{$rr['profile-name']}</option>\r\n";
-                       }
-               }
-               $o .= "</select>\r\n";
-               return $o;
-       }
-
        /**
         * @param string  $current  current
         * @param boolean $disabled optional, default false
@@ -222,46 +196,6 @@ class ContactSelector
                return $network_icon;
        }
 
-       /**
-        * @param string $current optional, default empty
-        * @param string $suffix  optionsl, default empty
-        * @return string
-        * @throws \Friendica\Network\HTTPException\InternalServerErrorException
-        */
-       public static function gender($current = "", $suffix = "")
-       {
-               $o = '';
-               $select = [
-                       ''                 => DI::l10n()->t('No answer'),
-                       'Male'             => DI::l10n()->t('Male'),
-                       'Female'           => DI::l10n()->t('Female'),
-                       'Currently Male'   => DI::l10n()->t('Currently Male'),
-                       'Currently Female' => DI::l10n()->t('Currently Female'),
-                       'Mostly Male'      => DI::l10n()->t('Mostly Male'),
-                       'Mostly Female'    => DI::l10n()->t('Mostly Female'),
-                       'Transgender'      => DI::l10n()->t('Transgender'),
-                       'Intersex'         => DI::l10n()->t('Intersex'),
-                       'Transsexual'      => DI::l10n()->t('Transsexual'),
-                       'Hermaphrodite'    => DI::l10n()->t('Hermaphrodite'),
-                       'Neuter'           => DI::l10n()->t('Neuter'),
-                       'Non-specific'     => DI::l10n()->t('Non-specific'),
-                       'Other'            => DI::l10n()->t('Other'),
-                       'Undecided'        => DI::l10n()->t('Undecided'),
-               ];
-
-               Hook::callAll('gender_selector', $select);
-
-               $o .= "<select name=\"gender$suffix\" id=\"gender-select$suffix\" size=\"1\" >";
-               foreach ($select as $neutral => $selection) {
-                       if ($selection !== 'NOTRANSLATION') {
-                               $selected = (($neutral == $current) ? ' selected="selected" ' : '');
-                               $o .= "<option value=\"$neutral\" $selected >$selection</option>";
-                       }
-               }
-               $o .= '</select>';
-               return $o;
-       }
-
        /**
         * @param string $current optional, default empty
         * @param string $suffix  optionsl, default empty