From 6ad75f5b41dcf61eb1b49d5eb403563df11e1bb4 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 9 Sep 2020 01:21:56 -0400 Subject: [PATCH] Remove over-specific location fields from vcard in favor of "location" --- src/Model/Profile.php | 12 +----------- view/templates/profile/vcard.tpl | 16 ++++++---------- .../duepuntozero/templates/profile/vcard.tpl | 16 ++++++---------- view/theme/frio/templates/profile/vcard.tpl | 9 ++------- view/theme/quattro/templates/profile/vcard.tpl | 16 ++++++---------- view/theme/smoothly/style.css | 5 ----- view/theme/vier/templates/profile/vcard.tpl | 16 ++++++---------- 7 files changed, 27 insertions(+), 63 deletions(-) diff --git a/src/Model/Profile.php b/src/Model/Profile.php index 3cd3afe6c..0ed393022 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -354,13 +354,7 @@ class Profile // Fetch the account type $account_type = Contact::getAccountType($profile); - if (!empty($profile['address']) - || !empty($profile['location']) - || !empty($profile['locality']) - || !empty($profile['region']) - || !empty($profile['postal-code']) - || !empty($profile['country-name']) - ) { + if (!empty($profile['address']) || !empty($profile['location'])) { $location = DI::l10n()->t('Location:'); } @@ -427,10 +421,6 @@ class Profile $p['about'] = BBCode::convert($p['about']); } - if (empty($p['address']) && !empty($p['location'])) { - $p['address'] = $p['location']; - } - if (isset($p['address'])) { $p['address'] = BBCode::convert($p['address']); } diff --git a/view/templates/profile/vcard.tpl b/view/templates/profile/vcard.tpl index ccf3a10bd..c4e9ea1d1 100644 --- a/view/templates/profile/vcard.tpl +++ b/view/templates/profile/vcard.tpl @@ -13,16 +13,12 @@ {{if $account_type}}
{{$account_type}}
{{/if}} {{if $profile.network_link}}
{{$network}}
{{$profile.network_link nofilter}}
{{/if}} {{if $location}} -
{{$location}}
-
- {{if $profile.address}}
{{$profile.address nofilter}}
{{/if}} - - {{$profile.locality}}{{if $profile.locality}}, {{/if}} - {{$profile.region}} - {{$profile.postal_code}} - - {{if $profile.country_name}}{{$profile.country_name}}{{/if}} -
+
+
{{$location}}
+
+ {{if $profile.address}}

{{$profile.address nofilter}}

{{/if}} + {{if $profile.location}}

{{$profile.location}}

{{/if}} +
{{/if}} diff --git a/view/theme/duepuntozero/templates/profile/vcard.tpl b/view/theme/duepuntozero/templates/profile/vcard.tpl index f40e98e46..ed6d52249 100644 --- a/view/theme/duepuntozero/templates/profile/vcard.tpl +++ b/view/theme/duepuntozero/templates/profile/vcard.tpl @@ -12,16 +12,12 @@ {{if $profile.network_link}}
{{$network}}
{{$profile.network_link nofilter}}
{{/if}} {{if $location}} -
{{$location}}
-
- {{if $profile.address}}
{{$profile.address nofilter}}
{{/if}} - - {{$profile.locality}}{{if $profile.locality}}, {{/if}} - {{$profile.region}} - {{$profile.postal_code}} - - {{if $profile.country_name}}{{$profile.country_name}}{{/if}} -
+
+
{{$location}}
+
+ {{if $profile.address}}

{{$profile.address nofilter}}

{{/if}} + {{if $profile.location}}

{{$profile.location}}

{{/if}} +
{{/if}} diff --git a/view/theme/frio/templates/profile/vcard.tpl b/view/theme/frio/templates/profile/vcard.tpl index 550bb6265..b1d4ada2d 100644 --- a/view/theme/frio/templates/profile/vcard.tpl +++ b/view/theme/frio/templates/profile/vcard.tpl @@ -80,13 +80,8 @@
- {{if $profile.address}}{{$profile.address nofilter}}{{/if}} - - {{$profile.locality}}{{if $profile.locality}}, {{/if}} - {{$profile.region}} - {{$profile.postal_code}} - - {{if $profile.country_name}}{{$profile.country_name}}{{/if}} + {{if $profile.address}}

{{$profile.address nofilter}}

{{/if}} + {{if $profile.location}}

{{$profile.location}}

{{/if}}
{{/if}} diff --git a/view/theme/quattro/templates/profile/vcard.tpl b/view/theme/quattro/templates/profile/vcard.tpl index 66422dd98..992700f10 100644 --- a/view/theme/quattro/templates/profile/vcard.tpl +++ b/view/theme/quattro/templates/profile/vcard.tpl @@ -24,16 +24,12 @@ {{if $profile.network_link}}
{{$network}}
{{$profile.network_link nofilter}}
{{/if}} {{if $location}} -
{{$location}}
-
- {{if $profile.address}}
{{$profile.address nofilter}}
{{/if}} - - {{$profile.locality}}{{if $profile.locality}}, {{/if}} - {{$profile.region}} - {{$profile.postal_code}} - - {{if $profile.country_name}}{{$profile.country_name}}{{/if}} -
+
+
{{$location}}
+
+ {{if $profile.address}}

{{$profile.address nofilter}}

{{/if}} + {{if $profile.location}}

{{$profile.location}}

{{/if}} +
{{/if}} diff --git a/view/theme/smoothly/style.css b/view/theme/smoothly/style.css index f997f2545..207aebbef 100644 --- a/view/theme/smoothly/style.css +++ b/view/theme/smoothly/style.css @@ -4500,11 +4500,6 @@ hr.line-dots { #page-footer {} #live-profile {} -.city-state-zip {} -.country-name {} -.locality {} -.region {} -.postal-code {} .mpfriend {} .toplevel_item {} diff --git a/view/theme/vier/templates/profile/vcard.tpl b/view/theme/vier/templates/profile/vcard.tpl index 5f8e718f0..06c7a0235 100644 --- a/view/theme/vier/templates/profile/vcard.tpl +++ b/view/theme/vier/templates/profile/vcard.tpl @@ -20,16 +20,12 @@ {{if $account_type}}{{/if}} {{if $profile.network_link}}
{{$network}}
{{$profile.network_link nofilter}}
{{/if}} {{if $location}} -
{{$location}}
-
- {{if $profile.address}}
{{$profile.address nofilter}}
{{/if}} - - {{$profile.locality}}{{if $profile.locality}}, {{/if}} - {{$profile.region}} - {{$profile.postal_code}} - - {{if $profile.country_name}}{{$profile.country_name}}{{/if}} -
+
+
{{$location}}
+
+ {{if $profile.address}}

{{$profile.address nofilter}}

{{/if}} + {{if $profile.location}}

{{$profile.location}}

{{/if}} +
{{/if}}