mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-16 20:05:14 +02:00
Remove usage of profile.gender
This commit is contained in:
parent
a7dd0173a7
commit
8e2910976f
10 changed files with 25 additions and 201 deletions
|
@ -196,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
|
||||
|
|
|
@ -722,7 +722,7 @@ class Contact
|
|||
}
|
||||
|
||||
$fields = ['name', 'photo', 'thumb', 'about', 'address', 'locality', 'region',
|
||||
'country-name', 'gender', 'pub_keywords', 'xmpp', 'net-publish'];
|
||||
'country-name', 'pub_keywords', 'xmpp', 'net-publish'];
|
||||
$profile = DBA::selectFirst('profile', $fields, ['uid' => $uid]);
|
||||
if (!DBA::isResult($profile)) {
|
||||
return;
|
||||
|
@ -733,7 +733,7 @@ class Contact
|
|||
$fields = ['name' => $profile['name'], 'nick' => $user['nickname'],
|
||||
'avatar-date' => $self['avatar-date'], 'location' => Profile::formatLocation($profile),
|
||||
'about' => $profile['about'], 'keywords' => $profile['pub_keywords'],
|
||||
'gender' => $profile['gender'], 'contact-type' => $user['account-type'],
|
||||
'gender' => '', 'contact-type' => $user['account-type'],
|
||||
'xmpp' => $profile['xmpp']];
|
||||
|
||||
$avatar = Photo::selectFirst(['resource-id', 'type'], ['uid' => $uid, 'profile' => true]);
|
||||
|
|
|
@ -1117,7 +1117,7 @@ class GContact
|
|||
);
|
||||
|
||||
$gcontact = ['name' => $userdata['name'], 'location' => $location, 'about' => $userdata['about'],
|
||||
'gender' => $userdata['gender'], 'keywords' => $userdata['pub_keywords'],
|
||||
'gender' => '', 'keywords' => $userdata['pub_keywords'],
|
||||
'birthday' => $userdata['dob'], 'photo' => $userdata['photo'],
|
||||
"notify" => $userdata['notify'], 'url' => $userdata['url'],
|
||||
"hide" => ($userdata['hidewall'] || !$userdata['net-publish']),
|
||||
|
|
|
@ -919,7 +919,6 @@ class Profile
|
|||
(`profile`.`locality` LIKE ?) OR
|
||||
(`profile`.`region` LIKE ?) OR
|
||||
(`profile`.`country-name` LIKE ?) OR
|
||||
(`profile`.`gender` LIKE ?) OR
|
||||
(`profile`.`marital` LIKE ?) OR
|
||||
(`profile`.`sexual` LIKE ?) OR
|
||||
(`profile`.`about` LIKE ?) OR
|
||||
|
@ -961,7 +960,6 @@ class Profile
|
|||
(`profile`.`locality` LIKE ?) OR
|
||||
(`profile`.`region` LIKE ?) OR
|
||||
(`profile`.`country-name` LIKE ?) OR
|
||||
(`profile`.`gender` LIKE ?) OR
|
||||
(`profile`.`marital` LIKE ?) OR
|
||||
(`profile`.`sexual` LIKE ?) OR
|
||||
(`profile`.`about` LIKE ?) OR
|
||||
|
|
|
@ -137,7 +137,6 @@ class Directory extends BaseModule
|
|||
$location = '';
|
||||
}
|
||||
|
||||
$gender = (!empty($profile['gender']) ? DI::l10n()->t('Gender:') : false);
|
||||
$marital = (!empty($profile['marital']) ? DI::l10n()->t('Status:') : false);
|
||||
$homepage = (!empty($profile['homepage']) ? DI::l10n()->t('Homepage:') : false);
|
||||
$about = (!empty($profile['about']) ? DI::l10n()->t('About:') : false);
|
||||
|
@ -160,7 +159,6 @@ class Directory extends BaseModule
|
|||
'profile' => $profile,
|
||||
'location' => $location_e,
|
||||
'tags' => $contact['pub_keywords'],
|
||||
'gender' => $gender,
|
||||
'pdesc' => $pdesc,
|
||||
'marital' => $marital,
|
||||
'homepage' => $homepage,
|
||||
|
|
|
@ -103,7 +103,7 @@ class NoScrape extends BaseModule
|
|||
$json_info['last-activity'] = date('o-W', $last_active);
|
||||
|
||||
//These are optional fields.
|
||||
$profile_fields = ['pdesc', 'locality', 'region', 'postal-code', 'country-name', 'gender', 'marital', 'about'];
|
||||
$profile_fields = ['pdesc', 'locality', 'region', 'postal-code', 'country-name', 'marital', 'about'];
|
||||
foreach ($profile_fields as $field) {
|
||||
if (!empty($a->profile[$field])) {
|
||||
$json_info["$field"] = $a->profile[$field];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue