Remove uses of profile.marital

This commit is contained in:
Hypolite Petovan 2020-01-27 23:01:25 -05:00
parent 8e2910976f
commit e69497454b
9 changed files with 1 additions and 81 deletions

View File

@ -234,59 +234,4 @@ class ContactSelector
$o .= '</select>';
return $o;
}
/**
* @param string $current optional, default empty
* @return string
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public static function maritalStatus($current = "")
{
$o = '';
$select = [
'' => DI::l10n()->t('No answer'),
'Single' => DI::l10n()->t('Single'),
'Lonely' => DI::l10n()->t('Lonely'),
'In a relation' => DI::l10n()->t('In a relation'),
'Has crush' => DI::l10n()->t('Has crush'),
'Infatuated' => DI::l10n()->t('Infatuated'),
'Dating' => DI::l10n()->t('Dating'),
'Unfaithful' => DI::l10n()->t('Unfaithful'),
'Sex Addict' => DI::l10n()->t('Sex Addict'),
'Friends' => DI::l10n()->t('Friends'),
'Friends/Benefits' => DI::l10n()->t('Friends/Benefits'),
'Casual' => DI::l10n()->t('Casual'),
'Engaged' => DI::l10n()->t('Engaged'),
'Married' => DI::l10n()->t('Married'),
'Imaginarily married' => DI::l10n()->t('Imaginarily married'),
'Partners' => DI::l10n()->t('Partners'),
'Cohabiting' => DI::l10n()->t('Cohabiting'),
'Common law' => DI::l10n()->t('Common law'),
'Happy' => DI::l10n()->t('Happy'),
'Not looking' => DI::l10n()->t('Not looking'),
'Swinger' => DI::l10n()->t('Swinger'),
'Betrayed' => DI::l10n()->t('Betrayed'),
'Separated' => DI::l10n()->t('Separated'),
'Unstable' => DI::l10n()->t('Unstable'),
'Divorced' => DI::l10n()->t('Divorced'),
'Imaginarily divorced' => DI::l10n()->t('Imaginarily divorced'),
'Widowed' => DI::l10n()->t('Widowed'),
'Uncertain' => DI::l10n()->t('Uncertain'),
'It\'s complicated' => DI::l10n()->t('It\'s complicated'),
'Don\'t care' => DI::l10n()->t('Don\'t care'),
'Ask me' => DI::l10n()->t('Ask me'),
];
Hook::callAll('marital_selector', $select);
$o .= '<select name="marital" id="marital-select" 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;
}
}

View File

@ -370,7 +370,6 @@ class Profile
}
$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;
$xmpp = !empty($profile['xmpp']) ? DI::l10n()->t('XMPP:') : false;
@ -449,10 +448,6 @@ class Profile
$p['gender'] = DI::l10n()->t($p['gender']);
}
if (isset($p['marital'])) {
$p['marital'] = DI::l10n()->t($p['marital']);
}
if (isset($p['photo'])) {
$p['photo'] = ProxyUtils::proxifyUrl($p['photo'], false, ProxyUtils::SIZE_SMALL);
}
@ -474,7 +469,6 @@ class Profile
'$account_type' => $account_type,
'$location' => $location,
'$gender' => $gender,
'$marital' => $marital,
'$homepage' => $homepage,
'$about' => $about,
'$network' => DI::l10n()->t('Network:'),
@ -919,7 +913,6 @@ class Profile
(`profile`.`locality` LIKE ?) OR
(`profile`.`region` LIKE ?) OR
(`profile`.`country-name` LIKE ?) OR
(`profile`.`marital` LIKE ?) OR
(`profile`.`sexual` LIKE ?) OR
(`profile`.`about` LIKE ?) OR
(`profile`.`romance` LIKE ?) OR
@ -960,7 +953,6 @@ class Profile
(`profile`.`locality` LIKE ?) OR
(`profile`.`region` LIKE ?) OR
(`profile`.`country-name` LIKE ?) OR
(`profile`.`marital` LIKE ?) OR
(`profile`.`sexual` LIKE ?) OR
(`profile`.`about` LIKE ?) OR
(`profile`.`romance` LIKE ?) OR

View File

@ -137,7 +137,6 @@ class Directory extends BaseModule
$location = '';
}
$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
'location' => $location_e,
'tags' => $contact['pub_keywords'],
'pdesc' => $pdesc,
'marital' => $marital,
'homepage' => $homepage,
'about' => $about,
'photo_menu' => $photo_menu,

View File

@ -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', 'marital', 'about'];
$profile_fields = ['pdesc', 'locality', 'region', 'postal-code', 'country-name', 'about'];
foreach ($profile_fields as $field) {
if (!empty($a->profile[$field])) {
$json_info["$field"] = $a->profile[$field];

View File

@ -43,8 +43,6 @@
{{if $updated}}<div class="updated" style="display:none;">{{$updated}}</div>{{/if}}
{{if $marital}}<dl class="marital"><dt class="marital-label"><span class="heart">&hearts;</span>{{$marital}}</dt><dd class="marital-text">{{$profile.marital}}</dd></dl>{{/if}}
{{if $homepage}}<dl class="homepage"><dt class="homepage-label">{{$homepage}}</dt><dd class="homepage-url u-url"><a href="{{$profile.homepage}}" rel="me" target="_blank">{{$profile.homepage}}</a></dd></dl>{{/if}}
{{if $about}}<dl class="about"><dt class="about-label">{{$about}}</dt><dd class="x-network">{{$profile.about nofilter}}</dd></dl>{{/if}}

View File

@ -30,8 +30,6 @@
{{if $profile.pubkey}}<div class="key" style="display:none;">{{$profile.pubkey}}</div>{{/if}}
{{if $marital}}<dl class="marital"><dt class="marital-label"><span class="heart">&hearts;</span>{{$marital}}</dt><dd class="marital-text">{{$profile.marital}}</dd></dl>{{/if}}
{{if $homepage}}<dl class="homepage"><dt class="homepage-label">{{$homepage}}</dt><dd class="homepage-url"><a href="{{$profile.homepage}}" class="u-url" rel="me" target="external-link">{{$profile.homepage}}</a></dd></dl>{{/if}}
{{include file="diaspora_vcard.tpl"}}

View File

@ -115,13 +115,6 @@
{{if $updated}}<div class="updated" style="display:none;">{{$updated}}</div>{{/if}}
{{if $marital}}
<div class="marital detail">
<span class="marital-label icon"><i class="fa fa-heart"></i></span>
<span class="marital-text icon">{{$profile.marital}}</span>
</div>
{{/if}}
{{if $homepage}}
<div class="homepage detail">
<span class="homepage-label icon"><i class="fa fa-external-link-square"></i></span>

View File

@ -49,8 +49,6 @@
{{if $profile.pubkey}}<div class="key" style="display:none;">{{$profile.pubkey}}</div>{{/if}}
{{if $marital}}<dl class="marital"><dt class="marital-label"><span class="heart">&hearts;</span>{{$marital}}</dt><dd class="marital-text">{{$profile.marital}}</dd></dl>{{/if}}
{{if $homepage}}
<dl class="homepage"><dt class="homepage-label">{{$homepage}}</dt>
<dd class="homepage-url"><a href="{{$profile.homepage}}" class="u-url" rel="me" target="external-link">{{$profile.homepage}}</a></dd>

View File

@ -54,8 +54,6 @@
{{if $updated}}<div class="updated" style="display:none;">{{$updated}}</div>{{/if}}
{{if $marital}}<dl class="marital"><dt class="marital-label"><span class="heart">&hearts;</span>{{$marital}}</dt><dd class="marital-text">{{$profile.marital}}</dd></dl>{{/if}}
{{if $homepage}}<dl class="homepage"><dt class="homepage-label">{{$homepage}}</dt><dd class="homepage-url"><a href="{{$profile.homepage}}" class="u-url" rel="me" target="_blank">{{$profile.homepage}}</a></dd></dl>{{/if}}
{{if $about}}<dl class="about"><dt class="about-label">{{$about}}</dt><dd class="x-network">{{$profile.about nofilter}}</dd></dl>{{/if}}