Merge pull request #8261 from MrPetovan/task/8251-use-about-for-pdesc

Use profile.about for profile description
This commit is contained in:
Michael Vogel 2020-02-10 23:36:59 +01:00 committed by GitHub
commit e80d68ba53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 53 additions and 53 deletions

View file

@ -96,7 +96,7 @@ class Show extends BaseApi
'profile_thumb' => $profile_row['thumb'],
'publish' => $profile_row['publish'] ? true : false,
'net_publish' => $profile_row['net-publish'] ? true : false,
'description' => $profile_row['pdesc'],
'description' => $profile_row['about'],
'date_of_birth' => $profile_row['dob'],
'address' => $profile_row['address'],
'city' => $profile_row['locality'],

View file

@ -124,7 +124,7 @@ class Directory extends BaseModule
$profile_link = $contact['profile_url'];
$pdesc = (($contact['pdesc']) ? $contact['pdesc'] . '<br />' : '');
$about = (($contact['about']) ? $contact['about'] . '<br />' : '');
$details = '';
if (strlen($contact['locality'])) {
@ -176,7 +176,7 @@ class Directory extends BaseModule
'profile' => $profile,
'location' => $location_e,
'tags' => $contact['pub_keywords'],
'pdesc' => $pdesc,
'about' => $about,
'homepage' => $homepage,
'photo_menu' => $photo_menu,

View file

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

View file

@ -155,8 +155,8 @@ class Profile extends BaseProfile
}
}
if ($a->profile['pdesc']) {
$basic_fields += self::buildField('pdesc', DI::l10n()->t('Description:'), HTML::toLink($a->profile['pdesc']));
if ($a->profile['about']) {
$basic_fields += self::buildField('about', DI::l10n()->t('Description:'), BBCode::convert($a->profile['about']));
}
if ($a->profile['xmpp']) {

View file

@ -89,7 +89,7 @@ class Index extends BaseSettings
$namechanged = $profile['name'] != $name;
$pdesc = Strings::escapeTags(trim($_POST['pdesc']));
$about = Strings::escapeTags(trim($_POST['about']));
$address = Strings::escapeTags(trim($_POST['address']));
$locality = Strings::escapeTags(trim($_POST['locality']));
$region = Strings::escapeTags(trim($_POST['region']));
@ -121,7 +121,7 @@ class Index extends BaseSettings
'profile',
[
'name' => $name,
'pdesc' => $pdesc,
'about' => $about,
'dob' => $dob,
'address' => $address,
'locality' => $locality,
@ -273,7 +273,7 @@ class Index extends BaseSettings
'$baseurl' => DI::baseUrl()->get(true),
'$nickname' => $a->user['nickname'],
'$name' => ['name', DI::l10n()->t('Display name:'), $profile['name']],
'$pdesc' => ['pdesc', DI::l10n()->t('Title/Description:'), $profile['pdesc']],
'$about' => ['about', DI::l10n()->t('Description:'), $profile['about']],
'$dob' => Temporal::getDateofBirthField($profile['dob'], $a->user['timezone']),
'$hide_friends' => $hide_friends,
'$address' => ['address', DI::l10n()->t('Street Address:'), $profile['address']],