diff --git a/database.sql b/database.sql index 78c71efee..9d4086994 100644 --- a/database.sql +++ b/database.sql @@ -1,6 +1,6 @@ -- ------------------------------------------ -- Friendica 2020.03-dev (Dalmatian Bellflower) --- DB_UPDATE_VERSION 1332 +-- DB_UPDATE_VERSION 1333 -- ------------------------------------------ @@ -999,7 +999,7 @@ CREATE TABLE IF NOT EXISTS `profile` ( `is-default` boolean COMMENT 'Deprecated', `hide-friends` boolean NOT NULL DEFAULT '0' COMMENT 'Hide friend list from viewers of this profile', `name` varchar(255) NOT NULL DEFAULT '' COMMENT '', - `pdesc` varchar(255) NOT NULL DEFAULT '' COMMENT 'Title or description', + `pdesc` varchar(255) COMMENT 'Deprecated', `dob` varchar(32) NOT NULL DEFAULT '0000-00-00' COMMENT 'Day of birth', `address` varchar(255) NOT NULL DEFAULT '' COMMENT '', `locality` varchar(255) NOT NULL DEFAULT '' COMMENT '', @@ -1018,7 +1018,7 @@ CREATE TABLE IF NOT EXISTS `profile` ( `prv_keywords` text COMMENT '', `likes` text COMMENT 'Deprecated', `dislikes` text COMMENT 'Deprecated', - `about` text COMMENT 'Deprecated', + `about` text COMMENT 'Profile description', `summary` varchar(255) COMMENT 'Deprecated', `music` text COMMENT 'Deprecated', `book` text COMMENT 'Deprecated', diff --git a/doc/database/db_profile.md b/doc/database/db_profile.md index 6b9689d12..375e06635 100644 --- a/doc/database/db_profile.md +++ b/doc/database/db_profile.md @@ -9,7 +9,7 @@ Table profile | is-default | Mark this profile as default profile | tinyint(1) | NO | | 0 | | | hide-friends | Hide friend list from viewers of this profile | tinyint(1) | NO | | 0 | | | name | | varchar(255) | NO | | | | -| pdesc | Title or description | varchar(255) | NO | | | | +| pdesc | Deprecated | varchar(255) | NO | | | | | dob | Day of birth | varchar(32) | NO | | 0001-01-01 | | | address | | varchar(255) | NO | | | | | locality | | varchar(255) | NO | | | | @@ -28,7 +28,7 @@ Table profile | prv_keywords | | text | NO | | NULL | | | likes | Deprecated | text | NO | | NULL | | | dislikes | Deprecated | text | NO | | NULL | | -| about | Deprecated | text | NO | | NULL | | +| about | Profile description | text | NO | | | | | summary | Deprecated | varchar(255) | NO | | | | | music | Deprecated | text | NO | | NULL | | | book | Deprecated | text | NO | | NULL | | diff --git a/mod/cal.php b/mod/cal.php index ff8969888..708d067d9 100644 --- a/mod/cal.php +++ b/mod/cal.php @@ -75,9 +75,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 b7ba79c2f..e9ef92ceb 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -81,7 +81,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 0fd99bdf4..8d666b8b6 100644 --- a/mod/videos.php +++ b/mod/videos.php @@ -66,7 +66,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 3d3438955..d3abc078c 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -739,7 +739,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 735bfdaf2..c5c2cb366 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -916,7 +916,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 @@ -951,7 +951,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 57646f973..316072d9b 100644 --- a/src/Module/Api/Friendica/Profile/Show.php +++ b/src/Module/Api/Friendica/Profile/Show.php @@ -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'], diff --git a/src/Module/Directory.php b/src/Module/Directory.php index ed1b70252..6bf246a37 100644 --- a/src/Module/Directory.php +++ b/src/Module/Directory.php @@ -124,7 +124,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'])) { @@ -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, diff --git a/src/Module/NoScrape.php b/src/Module/NoScrape.php index 373c9e0f6..8bc9e6a51 100644 --- a/src/Module/NoScrape.php +++ b/src/Module/NoScrape.php @@ -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]; diff --git a/src/Module/Profile/Profile.php b/src/Module/Profile/Profile.php index 5ed341a8a..896eb0c27 100644 --- a/src/Module/Profile/Profile.php +++ b/src/Module/Profile/Profile.php @@ -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']) { diff --git a/src/Module/Settings/Profile/Index.php b/src/Module/Settings/Profile/Index.php index 56ac9a447..d37b5ee4e 100644 --- a/src/Module/Settings/Profile/Index.php +++ b/src/Module/Settings/Profile/Index.php @@ -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']], diff --git a/src/Repository/ProfileField.php b/src/Repository/ProfileField.php index 6be1a1d94..b15084ea5 100644 --- a/src/Repository/ProfileField.php +++ b/src/Repository/ProfileField.php @@ -282,7 +282,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/static/dbstructure.config.php b/static/dbstructure.config.php index da92391dd..303e4f7e0 100755 --- a/static/dbstructure.config.php +++ b/static/dbstructure.config.php @@ -51,7 +51,7 @@ use Friendica\Database\DBA; if (!defined('DB_UPDATE_VERSION')) { - define('DB_UPDATE_VERSION', 1332); + define('DB_UPDATE_VERSION', 1333); } return [ @@ -1105,7 +1105,7 @@ return [ "is-default" => ["type" => "boolean", "comment" => "Deprecated"], "hide-friends" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Hide friend list from viewers of this profile"], "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], - "pdesc" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "Title or description"], + "pdesc" => ["type" => "varchar(255)", "comment" => "Deprecated"], "dob" => ["type" => "varchar(32)", "not null" => "1", "default" => "0000-00-00", "comment" => "Day of birth"], "address" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "locality" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], @@ -1124,7 +1124,7 @@ return [ "prv_keywords" => ["type" => "text", "comment" => ""], "likes" => ["type" => "text", "comment" => "Deprecated"], "dislikes" => ["type" => "text", "comment" => "Deprecated"], - "about" => ["type" => "text", "comment" => "Deprecated"], + "about" => ["type" => "text", "comment" => "Profile description"], "summary" => ["type" => "varchar(255)", "comment" => "Deprecated"], "music" => ["type" => "text", "comment" => "Deprecated"], "book" => ["type" => "text", "comment" => "Deprecated"], 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}}
{{$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 @@
-
- - +
+ +
-
+