From: Hypolite Petovan Date: Sun, 9 Feb 2020 07:36:19 +0000 (-0500) Subject: Use profile.about instead of profile.pdesc for profile description X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a42104ce435b8a3141fd54473335a011d840d0f9;p=friendica.git Use profile.about instead of profile.pdesc for profile description --- diff --git a/mod/cal.php b/mod/cal.php index 9e32b87d6f..8352917784 100644 --- a/mod/cal.php +++ b/mod/cal.php @@ -59,9 +59,9 @@ function cal_init(App $a) $vcard_widget = Renderer::replaceMacros($tpl, [ '$name' => $profile['name'], '$photo' => $profile['photo'], - '$addr' => (($profile['addr'] != "") ? $profile['addr'] : ""), + '$addr' => $profile['addr'] ?: '', '$account_type' => $account_type, - '$pdesc' => (($profile['pdesc'] != "") ? $profile['pdesc'] : ""), + '$about' => $profile['about'] ?: '', ]); $cal_widget = Widget\CalendarExport::getHTML(); diff --git a/mod/photos.php b/mod/photos.php index 0733bbc960..13fa855c91 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -65,7 +65,7 @@ function photos_init(App $a) { '$photo' => $profile['photo'], '$addr' => $profile['addr'] ?? '', '$account_type' => $account_type, - '$pdesc' => $profile['pdesc'] ?? '', + '$about' => $profile['about'] ?? '', ]); $albums = Photo::getAlbums($a->data['user']['uid']); diff --git a/mod/videos.php b/mod/videos.php index 36ddef6814..b8119a6861 100644 --- a/mod/videos.php +++ b/mod/videos.php @@ -50,7 +50,7 @@ function videos_init(App $a) '$photo' => $profile['photo'], '$addr' => $profile['addr'] ?? '', '$account_type' => $account_type, - '$pdesc' => $profile['pdesc'] ?? '', + '$about' => $profile['about'] ?? '', ]); // If not there, create 'aside' empty diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 051f94d3ef..02220750e0 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -722,7 +722,7 @@ class Contact return; } - $fields = ['name', 'photo', 'thumb', 'pdesc' => 'about', 'address', 'locality', 'region', + $fields = ['name', 'photo', 'thumb', 'about', 'address', 'locality', 'region', 'country-name', 'pub_keywords', 'xmpp', 'net-publish']; $profile = DBA::selectFirst('profile', $fields, ['uid' => $uid]); if (!DBA::isResult($profile)) { diff --git a/src/Model/Profile.php b/src/Model/Profile.php index 28491fb5f0..b06d951a65 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -899,7 +899,7 @@ class Profile WHERE $publish AND NOT `user`.`blocked` AND NOT `user`.`account_removed` AND ((`profile`.`name` LIKE ?) OR (`user`.`nickname` LIKE ?) OR - (`profile`.`pdesc` LIKE ?) OR + (`profile`.`about` LIKE ?) OR (`profile`.`locality` LIKE ?) OR (`profile`.`region` LIKE ?) OR (`profile`.`country-name` LIKE ?) OR @@ -934,7 +934,7 @@ class Profile WHERE $publish AND NOT `user`.`blocked` AND NOT `user`.`account_removed` AND `contact`.`self` AND ((`profile`.`name` LIKE ?) OR (`user`.`nickname` LIKE ?) OR - (`profile`.`pdesc` LIKE ?) OR + (`profile`.`about` LIKE ?) OR (`profile`.`locality` LIKE ?) OR (`profile`.`region` LIKE ?) OR (`profile`.`country-name` LIKE ?) OR diff --git a/src/Module/Api/Friendica/Profile/Show.php b/src/Module/Api/Friendica/Profile/Show.php index 2c50c53d50..c739ec694e 100644 --- a/src/Module/Api/Friendica/Profile/Show.php +++ b/src/Module/Api/Friendica/Profile/Show.php @@ -77,7 +77,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'], diff --git a/src/Module/Directory.php b/src/Module/Directory.php index 8335fb0cd4..56ec46303d 100644 --- a/src/Module/Directory.php +++ b/src/Module/Directory.php @@ -105,7 +105,7 @@ class Directory extends BaseModule $profile_link = $contact['profile_url']; - $pdesc = (($contact['pdesc']) ? $contact['pdesc'] . '
' : ''); + $about = (($contact['about']) ? $contact['about'] . '
' : ''); $details = ''; if (strlen($contact['locality'])) { @@ -157,7 +157,7 @@ class Directory extends BaseModule 'profile' => $profile, 'location' => $location_e, 'tags' => $contact['pub_keywords'], - 'pdesc' => $pdesc, + 'about' => $about, 'homepage' => $homepage, 'photo_menu' => $photo_menu, diff --git a/src/Module/NoScrape.php b/src/Module/NoScrape.php index 53b3fc4e3e..fa7cd9c5b2 100644 --- a/src/Module/NoScrape.php +++ b/src/Module/NoScrape.php @@ -112,7 +112,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]; diff --git a/src/Module/Profile/Profile.php b/src/Module/Profile/Profile.php index 690f4ee979..b4bac371cb 100644 --- a/src/Module/Profile/Profile.php +++ b/src/Module/Profile/Profile.php @@ -136,8 +136,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']) { diff --git a/src/Module/Settings/Profile/Index.php b/src/Module/Settings/Profile/Index.php index d8227d4aea..15a010e282 100644 --- a/src/Module/Settings/Profile/Index.php +++ b/src/Module/Settings/Profile/Index.php @@ -70,7 +70,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'])); @@ -102,7 +102,7 @@ class Index extends BaseSettings 'profile', [ 'name' => $name, - 'pdesc' => $pdesc, + 'about' => $about, 'dob' => $dob, 'address' => $address, 'locality' => $locality, @@ -254,7 +254,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']], diff --git a/src/Repository/ProfileField.php b/src/Repository/ProfileField.php index b1b16dcf1f..a6399eba58 100644 --- a/src/Repository/ProfileField.php +++ b/src/Repository/ProfileField.php @@ -263,7 +263,7 @@ class ProfileField extends BaseRepository 'religion' => $this->l10n->t('Religious Views:'), 'likes' => $this->l10n->t('Likes:'), 'dislikes' => $this->l10n->t('Dislikes:'), - 'about' => $this->l10n->t('About:'), + 'pdesc' => $this->l10n->t('Title/Description:'), 'summary' => $this->l10n->t('Summary'), 'music' => $this->l10n->t('Musical interests'), 'book' => $this->l10n->t('Books, literature'), diff --git a/view/templates/profile/vcard.tpl b/view/templates/profile/vcard.tpl index 826074a313..b8fc807fae 100644 --- a/view/templates/profile/vcard.tpl +++ b/view/templates/profile/vcard.tpl @@ -5,7 +5,7 @@ {{if $profile.addr}}
{{$profile.addr}}
{{/if}} - {{if $profile.pdesc}}
{{$profile.pdesc}}
{{/if}} + {{if $profile.about}}
{{$profile.about}}
{{/if}} {{if $profile.picdate}}
{{$profile.name}}
diff --git a/view/templates/settings/profile/index.tpl b/view/templates/settings/profile/index.tpl index c55928127e..3239fe6e0e 100644 --- a/view/templates/settings/profile/index.tpl +++ b/view/templates/settings/profile/index.tpl @@ -20,11 +20,11 @@
-
- - +
+ +
-
+
{{$dob nofilter}}
diff --git a/view/templates/widget/vcard.tpl b/view/templates/widget/vcard.tpl index 465d206b81..135d90a61b 100644 --- a/view/templates/widget/vcard.tpl +++ b/view/templates/widget/vcard.tpl @@ -2,7 +2,7 @@
{{$name}}
{{if $addr}}
{{$addr}}
{{/if}} - {{if $pdesc}}
{{$pdesc}}
{{/if}} + {{if $about}}
{{$about}}
{{/if}} {{if $url}}
{{$name}}
{{else}} diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index c312d30d1f..4b680a5955 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -732,7 +732,7 @@ input#dfrn-url { #profile-edit-profile-name-label, #profile-edit-name-label, -#profile-edit-pdesc-label, +#profile-edit-about-label, #profile-edit-dob-label, #profile-edit-address-label, #profile-edit-locality-label, @@ -748,7 +748,7 @@ input#dfrn-url { #profile-edit-profile-name, #profile-edit-name, -#profile-edit-pdesc, +#profile-edit-about, #profile-edit-dob, #profile-edit-address, #profile-edit-locality, @@ -823,7 +823,7 @@ input#dfrn-url { } -#profile-edit-pdesc-desc, +#profile-edit-about-desc, #profile-edit-pubkeywords-desc, #profile-edit-prvkeywords-desc { float: left; @@ -855,7 +855,7 @@ input#dfrn-url { } #profile-edit-name-end, -#profile-edit-pdesc-end, +#profile-edit-about-end, #profile-edit-dob-end, #profile-edit-address-end, #profile-edit-locality-end, diff --git a/view/theme/duepuntozero/templates/profile/vcard.tpl b/view/theme/duepuntozero/templates/profile/vcard.tpl index 4a835961b6..02187d9549 100644 --- a/view/theme/duepuntozero/templates/profile/vcard.tpl +++ b/view/theme/duepuntozero/templates/profile/vcard.tpl @@ -5,7 +5,7 @@ {{if $profile.addr}}
{{$profile.addr}}
{{/if}} - {{if $profile.pdesc}}
{{$profile.pdesc}}
{{/if}} + {{if $profile.about}}
{{$profile.about}}
{{/if}}
{{$profile.name}}
{{if $account_type}}{{/if}} diff --git a/view/theme/frio/templates/profile/vcard.tpl b/view/theme/frio/templates/profile/vcard.tpl index 95c89bd07b..2765dbc39e 100644 --- a/view/theme/frio/templates/profile/vcard.tpl +++ b/view/theme/frio/templates/profile/vcard.tpl @@ -41,7 +41,7 @@ {{if $profile.addr}}
{{include file="sub/punct_wrap.tpl" text=$profile.addr}}
{{/if}} - {{if $profile.pdesc}}
{{$profile.pdesc}}
{{/if}} + {{if $profile.about}}
{{$profile.about}}
{{/if}} {{if $account_type}}{{/if}}
diff --git a/view/theme/frio/templates/settings/profile/index.tpl b/view/theme/frio/templates/settings/profile/index.tpl index 4d7cf8d70e..1171bd8cbb 100644 --- a/view/theme/frio/templates/settings/profile/index.tpl +++ b/view/theme/frio/templates/settings/profile/index.tpl @@ -62,7 +62,7 @@
{{include file="field_input.tpl" field=$name}} - {{include file="field_input.tpl" field=$pdesc}} + {{include file="field_textarea.tpl" field=$about}} {{$dob nofilter}} diff --git a/view/theme/frio/templates/widget/vcard.tpl b/view/theme/frio/templates/widget/vcard.tpl index 366c570a74..fa65de0dc6 100644 --- a/view/theme/frio/templates/widget/vcard.tpl +++ b/view/theme/frio/templates/widget/vcard.tpl @@ -30,7 +30,7 @@ {{if $account_type}}{{/if}} - {{if $pdesc}}
{{$pdesc}}
{{/if}} + {{if $about}}
{{$about}}
{{/if}} {{if $network_link}}
{{$network}}
{{$network_link nofilter}}
{{/if}}
diff --git a/view/theme/quattro/dark/style.css b/view/theme/quattro/dark/style.css index 158a79bb9e..afed03ad6b 100644 --- a/view/theme/quattro/dark/style.css +++ b/view/theme/quattro/dark/style.css @@ -1945,7 +1945,7 @@ ul.tabs li .active { padding: 7px; } #profile-edit-name-label, -#profile-edit-pdesc-label, +#profile-edit-about-label, #profile-edit-dob-label, #profile-edit-address-label, #profile-edit-locality-label, @@ -1960,7 +1960,7 @@ ul.tabs li .active { padding-top: 7px; } #profile-edit-name, -#profile-edit-pdesc, +#profile-edit-about, #profile-edit-dob, #profile-edit-address, #profile-edit-locality, diff --git a/view/theme/quattro/green/style.css b/view/theme/quattro/green/style.css index 516742378b..55c15eeb38 100644 --- a/view/theme/quattro/green/style.css +++ b/view/theme/quattro/green/style.css @@ -1945,7 +1945,7 @@ ul.tabs li .active { padding: 7px; } #profile-edit-name-label, -#profile-edit-pdesc-label, +#profile-edit-about-label, #profile-edit-dob-label, #profile-edit-address-label, #profile-edit-locality-label, @@ -1960,7 +1960,7 @@ ul.tabs li .active { padding-top: 7px; } #profile-edit-name, -#profile-edit-pdesc, +#profile-edit-about, #profile-edit-dob, #profile-edit-address, #profile-edit-locality, diff --git a/view/theme/quattro/lilac/style.css b/view/theme/quattro/lilac/style.css index 8577e62591..2cabdf5cc8 100644 --- a/view/theme/quattro/lilac/style.css +++ b/view/theme/quattro/lilac/style.css @@ -1945,7 +1945,7 @@ ul.tabs li .active { padding: 7px; } #profile-edit-name-label, -#profile-edit-pdesc-label, +#profile-edit-about-label, #profile-edit-dob-label, #profile-edit-address-label, #profile-edit-locality-label, @@ -1960,7 +1960,7 @@ ul.tabs li .active { padding-top: 7px; } #profile-edit-name, -#profile-edit-pdesc, +#profile-edit-about, #profile-edit-dob, #profile-edit-address, #profile-edit-locality, diff --git a/view/theme/quattro/quattro.less b/view/theme/quattro/quattro.less index b7269f649b..3d3f94f238 100644 --- a/view/theme/quattro/quattro.less +++ b/view/theme/quattro/quattro.less @@ -1238,7 +1238,7 @@ ul.tabs { padding: 7px; } #profile-edit-name-label, -#profile-edit-pdesc-label, +#profile-edit-about-label, #profile-edit-dob-label, #profile-edit-address-label, #profile-edit-locality-label, @@ -1253,7 +1253,7 @@ ul.tabs { padding-top: 7px; } #profile-edit-name, -#profile-edit-pdesc, +#profile-edit-about, #profile-edit-dob, #profile-edit-address, #profile-edit-locality, diff --git a/view/theme/quattro/templates/profile/vcard.tpl b/view/theme/quattro/templates/profile/vcard.tpl index 5e7b3efc86..6f9e5cffbe 100644 --- a/view/theme/quattro/templates/profile/vcard.tpl +++ b/view/theme/quattro/templates/profile/vcard.tpl @@ -17,7 +17,7 @@ {{if $profile.addr}}
{{$profile.addr}}
{{/if}} - {{if $pdesc}}
{{$profile.pdesc}}
{{/if}} + {{if $about}}
{{$profile.about}}
{{/if}}
{{$profile.name}}
{{if $account_type}}{{/if}} diff --git a/view/theme/vier/templates/profile/vcard.tpl b/view/theme/vier/templates/profile/vcard.tpl index 9a0394facf..940bdd016b 100644 --- a/view/theme/vier/templates/profile/vcard.tpl +++ b/view/theme/vier/templates/profile/vcard.tpl @@ -11,7 +11,7 @@ {{if $profile.addr}}
{{$profile.addr}}
{{/if}} - {{if $profile.pdesc}}
{{$profile.pdesc}}
{{/if}} + {{if $profile.about}}
{{$profile.about}}
{{/if}} {{if $profile.picdate}}
{{$profile.name}}
diff --git a/view/theme/vier/templates/settings/profile/index.tpl b/view/theme/vier/templates/settings/profile/index.tpl index eab7c2c4a4..7cabebc167 100644 --- a/view/theme/vier/templates/settings/profile/index.tpl +++ b/view/theme/vier/templates/settings/profile/index.tpl @@ -54,11 +54,11 @@
-
- - +
+ +
-
+