Use profile.about instead of profile.pdesc for profile description

This commit is contained in:
Hypolite Petovan 2020-02-09 02:36:19 -05:00
parent da09215db8
commit a42104ce43
26 changed files with 45 additions and 45 deletions

View file

@ -59,9 +59,9 @@ function cal_init(App $a)
$vcard_widget = Renderer::replaceMacros($tpl, [ $vcard_widget = Renderer::replaceMacros($tpl, [
'$name' => $profile['name'], '$name' => $profile['name'],
'$photo' => $profile['photo'], '$photo' => $profile['photo'],
'$addr' => (($profile['addr'] != "") ? $profile['addr'] : ""), '$addr' => $profile['addr'] ?: '',
'$account_type' => $account_type, '$account_type' => $account_type,
'$pdesc' => (($profile['pdesc'] != "") ? $profile['pdesc'] : ""), '$about' => $profile['about'] ?: '',
]); ]);
$cal_widget = Widget\CalendarExport::getHTML(); $cal_widget = Widget\CalendarExport::getHTML();

View file

@ -65,7 +65,7 @@ function photos_init(App $a) {
'$photo' => $profile['photo'], '$photo' => $profile['photo'],
'$addr' => $profile['addr'] ?? '', '$addr' => $profile['addr'] ?? '',
'$account_type' => $account_type, '$account_type' => $account_type,
'$pdesc' => $profile['pdesc'] ?? '', '$about' => $profile['about'] ?? '',
]); ]);
$albums = Photo::getAlbums($a->data['user']['uid']); $albums = Photo::getAlbums($a->data['user']['uid']);

View file

@ -50,7 +50,7 @@ function videos_init(App $a)
'$photo' => $profile['photo'], '$photo' => $profile['photo'],
'$addr' => $profile['addr'] ?? '', '$addr' => $profile['addr'] ?? '',
'$account_type' => $account_type, '$account_type' => $account_type,
'$pdesc' => $profile['pdesc'] ?? '', '$about' => $profile['about'] ?? '',
]); ]);
// If not there, create 'aside' empty // If not there, create 'aside' empty

View file

@ -722,7 +722,7 @@ class Contact
return; 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']; 'country-name', 'pub_keywords', 'xmpp', 'net-publish'];
$profile = DBA::selectFirst('profile', $fields, ['uid' => $uid]); $profile = DBA::selectFirst('profile', $fields, ['uid' => $uid]);
if (!DBA::isResult($profile)) { if (!DBA::isResult($profile)) {

View file

@ -899,7 +899,7 @@ class Profile
WHERE $publish AND NOT `user`.`blocked` AND NOT `user`.`account_removed` WHERE $publish AND NOT `user`.`blocked` AND NOT `user`.`account_removed`
AND ((`profile`.`name` LIKE ?) OR AND ((`profile`.`name` LIKE ?) OR
(`user`.`nickname` LIKE ?) OR (`user`.`nickname` LIKE ?) OR
(`profile`.`pdesc` LIKE ?) OR (`profile`.`about` LIKE ?) OR
(`profile`.`locality` LIKE ?) OR (`profile`.`locality` LIKE ?) OR
(`profile`.`region` LIKE ?) OR (`profile`.`region` LIKE ?) OR
(`profile`.`country-name` 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` WHERE $publish AND NOT `user`.`blocked` AND NOT `user`.`account_removed` AND `contact`.`self`
AND ((`profile`.`name` LIKE ?) OR AND ((`profile`.`name` LIKE ?) OR
(`user`.`nickname` LIKE ?) OR (`user`.`nickname` LIKE ?) OR
(`profile`.`pdesc` LIKE ?) OR (`profile`.`about` LIKE ?) OR
(`profile`.`locality` LIKE ?) OR (`profile`.`locality` LIKE ?) OR
(`profile`.`region` LIKE ?) OR (`profile`.`region` LIKE ?) OR
(`profile`.`country-name` LIKE ?) OR (`profile`.`country-name` LIKE ?) OR

View file

@ -77,7 +77,7 @@ class Show extends BaseApi
'profile_thumb' => $profile_row['thumb'], 'profile_thumb' => $profile_row['thumb'],
'publish' => $profile_row['publish'] ? true : false, 'publish' => $profile_row['publish'] ? true : false,
'net_publish' => $profile_row['net-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'], 'date_of_birth' => $profile_row['dob'],
'address' => $profile_row['address'], 'address' => $profile_row['address'],
'city' => $profile_row['locality'], 'city' => $profile_row['locality'],

View file

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

View file

@ -112,7 +112,7 @@ class NoScrape extends BaseModule
$json_info['last-activity'] = date('o-W', $last_active); $json_info['last-activity'] = date('o-W', $last_active);
//These are optional fields. //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) { foreach ($profile_fields as $field) {
if (!empty($a->profile[$field])) { if (!empty($a->profile[$field])) {
$json_info["$field"] = $a->profile[$field]; $json_info["$field"] = $a->profile[$field];

View file

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

View file

@ -70,7 +70,7 @@ class Index extends BaseSettings
$namechanged = $profile['name'] != $name; $namechanged = $profile['name'] != $name;
$pdesc = Strings::escapeTags(trim($_POST['pdesc'])); $about = Strings::escapeTags(trim($_POST['about']));
$address = Strings::escapeTags(trim($_POST['address'])); $address = Strings::escapeTags(trim($_POST['address']));
$locality = Strings::escapeTags(trim($_POST['locality'])); $locality = Strings::escapeTags(trim($_POST['locality']));
$region = Strings::escapeTags(trim($_POST['region'])); $region = Strings::escapeTags(trim($_POST['region']));
@ -102,7 +102,7 @@ class Index extends BaseSettings
'profile', 'profile',
[ [
'name' => $name, 'name' => $name,
'pdesc' => $pdesc, 'about' => $about,
'dob' => $dob, 'dob' => $dob,
'address' => $address, 'address' => $address,
'locality' => $locality, 'locality' => $locality,
@ -254,7 +254,7 @@ class Index extends BaseSettings
'$baseurl' => DI::baseUrl()->get(true), '$baseurl' => DI::baseUrl()->get(true),
'$nickname' => $a->user['nickname'], '$nickname' => $a->user['nickname'],
'$name' => ['name', DI::l10n()->t('Display name:'), $profile['name']], '$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']), '$dob' => Temporal::getDateofBirthField($profile['dob'], $a->user['timezone']),
'$hide_friends' => $hide_friends, '$hide_friends' => $hide_friends,
'$address' => ['address', DI::l10n()->t('Street Address:'), $profile['address']], '$address' => ['address', DI::l10n()->t('Street Address:'), $profile['address']],

View file

@ -263,7 +263,7 @@ class ProfileField extends BaseRepository
'religion' => $this->l10n->t('Religious Views:'), 'religion' => $this->l10n->t('Religious Views:'),
'likes' => $this->l10n->t('Likes:'), 'likes' => $this->l10n->t('Likes:'),
'dislikes' => $this->l10n->t('Dislikes:'), 'dislikes' => $this->l10n->t('Dislikes:'),
'about' => $this->l10n->t('About:'), 'pdesc' => $this->l10n->t('Title/Description:'),
'summary' => $this->l10n->t('Summary'), 'summary' => $this->l10n->t('Summary'),
'music' => $this->l10n->t('Musical interests'), 'music' => $this->l10n->t('Musical interests'),
'book' => $this->l10n->t('Books, literature'), 'book' => $this->l10n->t('Books, literature'),

View file

@ -5,7 +5,7 @@
{{if $profile.addr}}<div class="p-addr">{{$profile.addr}}</div>{{/if}} {{if $profile.addr}}<div class="p-addr">{{$profile.addr}}</div>{{/if}}
{{if $profile.pdesc}}<div class="title">{{$profile.pdesc}}</div>{{/if}} {{if $profile.about}}<div class="title">{{$profile.about}}</div>{{/if}}
{{if $profile.picdate}} {{if $profile.picdate}}
<div id="profile-photo-wrapper"><a href="{{$profile.url}}"><img class="photo u-photo" width="175" height="175" src="{{$profile.photo}}?rev={{$profile.picdate}}" alt="{{$profile.name}}"></a></div> <div id="profile-photo-wrapper"><a href="{{$profile.url}}"><img class="photo u-photo" width="175" height="175" src="{{$profile.photo}}?rev={{$profile.picdate}}" alt="{{$profile.name}}"></a></div>

View file

@ -20,11 +20,11 @@
<input type="text" size="32" name="name" id="profile-edit-name" value="{{$name.2}}"/> <input type="text" size="32" name="name" id="profile-edit-name" value="{{$name.2}}"/>
</div> </div>
<div id="profile-edit-name-end"></div> <div id="profile-edit-name-end"></div>
<div id="profile-edit-pdesc-wrapper"> <div id="profile-edit-about-wrapper">
<label id="profile-edit-pdesc-label" for="profile-edit-pdesc">{{$pdesc.1}} </label> <label id="profile-edit-about-label" for="profile-edit-about">{{$about.1}} </label>
<input type="text" size="32" name="pdesc" id="profile-edit-pdesc" value="{{$pdesc.1}}"/> <input type="text" size="32" name="about" id="profile-edit-about" value="{{$about.1}}"/>
</div> </div>
<div id="profile-edit-pdesc-end"></div> <div id="profile-edit-about-end"></div>
<div id="profile-edit-dob-wrapper"> <div id="profile-edit-dob-wrapper">
{{$dob nofilter}} {{$dob nofilter}}
</div> </div>

View file

@ -2,7 +2,7 @@
<div class="vcard h-card"> <div class="vcard h-card">
<div class="fn p-name">{{$name}}</div> <div class="fn p-name">{{$name}}</div>
{{if $addr}}<div class="p-addr">{{$addr}}</div>{{/if}} {{if $addr}}<div class="p-addr">{{$addr}}</div>{{/if}}
{{if $pdesc}}<div class="title p-job-title">{{$pdesc}}</div>{{/if}} {{if $about}}<div class="title p-job-title">{{$about}}</div>{{/if}}
{{if $url}} {{if $url}}
<div id="profile-photo-wrapper"><a href="{{$url}}"><img class="vcard-photo photo u-photo" style="width: 175px; height: 175px;" src="{{$photo}}" alt="{{$name}}" /></a></div> <div id="profile-photo-wrapper"><a href="{{$url}}"><img class="vcard-photo photo u-photo" style="width: 175px; height: 175px;" src="{{$photo}}" alt="{{$name}}" /></a></div>
{{else}} {{else}}

View file

@ -732,7 +732,7 @@ input#dfrn-url {
#profile-edit-profile-name-label, #profile-edit-profile-name-label,
#profile-edit-name-label, #profile-edit-name-label,
#profile-edit-pdesc-label, #profile-edit-about-label,
#profile-edit-dob-label, #profile-edit-dob-label,
#profile-edit-address-label, #profile-edit-address-label,
#profile-edit-locality-label, #profile-edit-locality-label,
@ -748,7 +748,7 @@ input#dfrn-url {
#profile-edit-profile-name, #profile-edit-profile-name,
#profile-edit-name, #profile-edit-name,
#profile-edit-pdesc, #profile-edit-about,
#profile-edit-dob, #profile-edit-dob,
#profile-edit-address, #profile-edit-address,
#profile-edit-locality, #profile-edit-locality,
@ -823,7 +823,7 @@ input#dfrn-url {
} }
#profile-edit-pdesc-desc, #profile-edit-about-desc,
#profile-edit-pubkeywords-desc, #profile-edit-pubkeywords-desc,
#profile-edit-prvkeywords-desc { #profile-edit-prvkeywords-desc {
float: left; float: left;
@ -855,7 +855,7 @@ input#dfrn-url {
} }
#profile-edit-name-end, #profile-edit-name-end,
#profile-edit-pdesc-end, #profile-edit-about-end,
#profile-edit-dob-end, #profile-edit-dob-end,
#profile-edit-address-end, #profile-edit-address-end,
#profile-edit-locality-end, #profile-edit-locality-end,

View file

@ -5,7 +5,7 @@
{{if $profile.addr}}<div class="p-addr">{{$profile.addr}}</div>{{/if}} {{if $profile.addr}}<div class="p-addr">{{$profile.addr}}</div>{{/if}}
{{if $profile.pdesc}}<div class="title">{{$profile.pdesc}}</div>{{/if}} {{if $profile.about}}<div class="title">{{$profile.about}}</div>{{/if}}
<div id="profile-photo-wrapper"><img class="photo u-photo" width="175" height="175" src="{{$profile.photo}}?rev={{$profile.picdate}}" alt="{{$profile.name}}"></div> <div id="profile-photo-wrapper"><img class="photo u-photo" width="175" height="175" src="{{$profile.photo}}?rev={{$profile.picdate}}" alt="{{$profile.name}}"></div>
{{if $account_type}}<div class="account-type">{{$account_type}}</div>{{/if}} {{if $account_type}}<div class="account-type">{{$account_type}}</div>{{/if}}

View file

@ -41,7 +41,7 @@
{{if $profile.addr}}<div class="p-addr">{{include file="sub/punct_wrap.tpl" text=$profile.addr}}</div>{{/if}} {{if $profile.addr}}<div class="p-addr">{{include file="sub/punct_wrap.tpl" text=$profile.addr}}</div>{{/if}}
{{if $profile.pdesc}}<div class="title">{{$profile.pdesc}}</div>{{/if}} {{if $profile.about}}<div class="title">{{$profile.about}}</div>{{/if}}
{{if $account_type}}<div class="account-type">({{$account_type}})</div>{{/if}} {{if $account_type}}<div class="account-type">({{$account_type}})</div>{{/if}}
</div> </div>

View file

@ -62,7 +62,7 @@
<div class="section-content-tools-wrapper"> <div class="section-content-tools-wrapper">
{{include file="field_input.tpl" field=$name}} {{include file="field_input.tpl" field=$name}}
{{include file="field_input.tpl" field=$pdesc}} {{include file="field_textarea.tpl" field=$about}}
{{$dob nofilter}} {{$dob nofilter}}

View file

@ -30,7 +30,7 @@
{{if $account_type}}<div class="account-type">({{$account_type}})</div>{{/if}} {{if $account_type}}<div class="account-type">({{$account_type}})</div>{{/if}}
{{if $pdesc}}<div class="title">{{$pdesc}}</div>{{/if}} {{if $about}}<div class="title">{{$about}}</div>{{/if}}
{{if $network_link}}<dl class="network"><dt class="network-label">{{$network}}</dt><dd class="x-network">{{$network_link nofilter}}</dd></dl>{{/if}} {{if $network_link}}<dl class="network"><dt class="network-label">{{$network}}</dt><dd class="x-network">{{$network_link nofilter}}</dd></dl>{{/if}}
</div> </div>

View file

@ -1945,7 +1945,7 @@ ul.tabs li .active {
padding: 7px; padding: 7px;
} }
#profile-edit-name-label, #profile-edit-name-label,
#profile-edit-pdesc-label, #profile-edit-about-label,
#profile-edit-dob-label, #profile-edit-dob-label,
#profile-edit-address-label, #profile-edit-address-label,
#profile-edit-locality-label, #profile-edit-locality-label,
@ -1960,7 +1960,7 @@ ul.tabs li .active {
padding-top: 7px; padding-top: 7px;
} }
#profile-edit-name, #profile-edit-name,
#profile-edit-pdesc, #profile-edit-about,
#profile-edit-dob, #profile-edit-dob,
#profile-edit-address, #profile-edit-address,
#profile-edit-locality, #profile-edit-locality,

View file

@ -1945,7 +1945,7 @@ ul.tabs li .active {
padding: 7px; padding: 7px;
} }
#profile-edit-name-label, #profile-edit-name-label,
#profile-edit-pdesc-label, #profile-edit-about-label,
#profile-edit-dob-label, #profile-edit-dob-label,
#profile-edit-address-label, #profile-edit-address-label,
#profile-edit-locality-label, #profile-edit-locality-label,
@ -1960,7 +1960,7 @@ ul.tabs li .active {
padding-top: 7px; padding-top: 7px;
} }
#profile-edit-name, #profile-edit-name,
#profile-edit-pdesc, #profile-edit-about,
#profile-edit-dob, #profile-edit-dob,
#profile-edit-address, #profile-edit-address,
#profile-edit-locality, #profile-edit-locality,

View file

@ -1945,7 +1945,7 @@ ul.tabs li .active {
padding: 7px; padding: 7px;
} }
#profile-edit-name-label, #profile-edit-name-label,
#profile-edit-pdesc-label, #profile-edit-about-label,
#profile-edit-dob-label, #profile-edit-dob-label,
#profile-edit-address-label, #profile-edit-address-label,
#profile-edit-locality-label, #profile-edit-locality-label,
@ -1960,7 +1960,7 @@ ul.tabs li .active {
padding-top: 7px; padding-top: 7px;
} }
#profile-edit-name, #profile-edit-name,
#profile-edit-pdesc, #profile-edit-about,
#profile-edit-dob, #profile-edit-dob,
#profile-edit-address, #profile-edit-address,
#profile-edit-locality, #profile-edit-locality,

View file

@ -1238,7 +1238,7 @@ ul.tabs {
padding: 7px; padding: 7px;
} }
#profile-edit-name-label, #profile-edit-name-label,
#profile-edit-pdesc-label, #profile-edit-about-label,
#profile-edit-dob-label, #profile-edit-dob-label,
#profile-edit-address-label, #profile-edit-address-label,
#profile-edit-locality-label, #profile-edit-locality-label,
@ -1253,7 +1253,7 @@ ul.tabs {
padding-top: 7px; padding-top: 7px;
} }
#profile-edit-name, #profile-edit-name,
#profile-edit-pdesc, #profile-edit-about,
#profile-edit-dob, #profile-edit-dob,
#profile-edit-address, #profile-edit-address,
#profile-edit-locality, #profile-edit-locality,

View file

@ -17,7 +17,7 @@
{{if $profile.addr}}<div class="p-addr">{{$profile.addr}}</div>{{/if}} {{if $profile.addr}}<div class="p-addr">{{$profile.addr}}</div>{{/if}}
{{if $pdesc}}<div class="title">{{$profile.pdesc}}</div>{{/if}} {{if $about}}<div class="title">{{$profile.about}}</div>{{/if}}
<div id="profile-photo-wrapper"><img class="photo u-photo" width="175" height="175" src="{{$profile.photo}}?rev={{$profile.picdate}}" alt="{{$profile.name}}" /></div> <div id="profile-photo-wrapper"><img class="photo u-photo" width="175" height="175" src="{{$profile.photo}}?rev={{$profile.picdate}}" alt="{{$profile.name}}" /></div>
{{if $account_type}}<div class="account-type">{{$account_type}}</div>{{/if}} {{if $account_type}}<div class="account-type">{{$account_type}}</div>{{/if}}

View file

@ -11,7 +11,7 @@
{{if $profile.addr}}<div class="p-addr">{{$profile.addr}}</div>{{/if}} {{if $profile.addr}}<div class="p-addr">{{$profile.addr}}</div>{{/if}}
{{if $profile.pdesc}}<div class="title">{{$profile.pdesc}}</div>{{/if}} {{if $profile.about}}<div class="title">{{$profile.about}}</div>{{/if}}
{{if $profile.picdate}} {{if $profile.picdate}}
<div id="profile-photo-wrapper"><a href="{{$profile.url}}"><img class="photo u-photo" src="{{$profile.photo}}?rev={{$profile.picdate}}" alt="{{$profile.name}}"></a></div> <div id="profile-photo-wrapper"><a href="{{$profile.url}}"><img class="photo u-photo" src="{{$profile.photo}}?rev={{$profile.picdate}}" alt="{{$profile.name}}"></a></div>

View file

@ -54,11 +54,11 @@
</div> </div>
<div id="profile-edit-name-end"></div> <div id="profile-edit-name-end"></div>
<div id="profile-edit-pdesc-wrapper"> <div id="profile-edit-about-wrapper">
<label id="profile-edit-pdesc-label" for="profile-edit-pdesc">{{$pdesc.1}} </label> <label id="profile-edit-about-label" for="profile-edit-about">{{$about.1}} </label>
<input type="text" size="32" name="pdesc" id="profile-edit-pdesc" value="{{$pdesc.2}}"/> <input type="text" size="32" name="about" id="profile-edit-about" value="{{$about.2}}"/>
</div> </div>
<div id="profile-edit-pdesc-end"></div> <div id="profile-edit-about-end"></div>
<div id="profile-edit-xmpp-wrapper"> <div id="profile-edit-xmpp-wrapper">
<label id="profile-edit-xmpp-label" for="profile-edit-xmpp">{{$xmpp.1}} </label> <label id="profile-edit-xmpp-label" for="profile-edit-xmpp">{{$xmpp.1}} </label>