From a42104ce435b8a3141fd54473335a011d840d0f9 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 9 Feb 2020 02:36:19 -0500 Subject: [PATCH] Use profile.about instead of profile.pdesc for profile description --- mod/cal.php | 4 ++-- mod/photos.php | 2 +- mod/videos.php | 2 +- src/Model/Contact.php | 2 +- src/Model/Profile.php | 4 ++-- src/Module/Api/Friendica/Profile/Show.php | 2 +- src/Module/Directory.php | 4 ++-- src/Module/NoScrape.php | 2 +- src/Module/Profile/Profile.php | 4 ++-- src/Module/Settings/Profile/Index.php | 6 +++--- src/Repository/ProfileField.php | 2 +- view/templates/profile/vcard.tpl | 2 +- view/templates/settings/profile/index.tpl | 8 ++++---- view/templates/widget/vcard.tpl | 2 +- view/theme/duepuntozero/style.css | 8 ++++---- view/theme/duepuntozero/templates/profile/vcard.tpl | 2 +- view/theme/frio/templates/profile/vcard.tpl | 2 +- view/theme/frio/templates/settings/profile/index.tpl | 2 +- view/theme/frio/templates/widget/vcard.tpl | 2 +- view/theme/quattro/dark/style.css | 4 ++-- view/theme/quattro/green/style.css | 4 ++-- view/theme/quattro/lilac/style.css | 4 ++-- view/theme/quattro/quattro.less | 4 ++-- view/theme/quattro/templates/profile/vcard.tpl | 2 +- view/theme/vier/templates/profile/vcard.tpl | 2 +- view/theme/vier/templates/settings/profile/index.tpl | 8 ++++---- 26 files changed, 45 insertions(+), 45 deletions(-) diff --git a/mod/cal.php b/mod/cal.php index 9e32b87d6..835291778 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 0733bbc96..13fa855c9 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 36ddef681..b8119a686 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 051f94d3e..02220750e 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 28491fb5f..b06d951a6 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 2c50c53d5..c739ec694 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 8335fb0cd..56ec46303 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 53b3fc4e3..fa7cd9c5b 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 690f4ee97..b4bac371c 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 d8227d4ae..15a010e28 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 b1b16dcf1..a6399eba5 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 826074a31..b8fc807fa 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 c55928127..3239fe6e0 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 465d206b8..135d90a61 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 c312d30d1..4b680a595 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 4a835961b..02187d954 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 95c89bd07..2765dbc39 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 4d7cf8d70..1171bd8cb 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 366c570a7..fa65de0dc 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 158a79bb9..afed03ad6 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 516742378..55c15eeb3 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 8577e6259..2cabdf5cc 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 b7269f649..3d3f94f23 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 5e7b3efc8..6f9e5cffb 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 9a0394fac..940bdd016 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 eab7c2c4a..7cabebc16 100644 --- a/view/theme/vier/templates/settings/profile/index.tpl +++ b/view/theme/vier/templates/settings/profile/index.tpl @@ -54,11 +54,11 @@
-
- - +
+ +
-
+