]> git.mxchange.org Git - friendica.git/commitdiff
Normalize uses of Strings::formatNetworkName to $network_link
authorHypolite Petovan <hypolite@mrpetovan.com>
Wed, 26 Dec 2018 16:03:41 +0000 (11:03 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Wed, 26 Dec 2018 16:11:38 +0000 (11:11 -0500)
- Unescape HTML template variable $network_link

mod/hovercard.php
src/Model/Profile.php
src/Module/Contact.php
view/templates/hovercard.tpl
view/templates/profile_vcard.tpl
view/templates/vcard-widget.tpl
view/theme/duepuntozero/templates/profile_vcard.tpl
view/theme/frio/templates/vcard-widget.tpl
view/theme/quattro/templates/profile_vcard.tpl
view/theme/vier/templates/profile_vcard.tpl

index 6160642762a4adcbc427d6f21b048fa62df60c19..101ebd5af2e4e1b9068e9550368ef7bad137565c 100644 (file)
@@ -96,20 +96,20 @@ function hovercard_content()
 
        // Move the contact data to the profile array so we can deliver it to
        $profile = [
-               'name'     => $contact['name'],
-               'nick'     => $contact['nick'],
-               'addr'     => defaults($contact, 'addr', $contact['url']),
-               'thumb'    => ProxyUtils::proxifyUrl($contact['thumb'], false, ProxyUtils::SIZE_THUMB),
-               'url'      => Contact::magicLink($contact['url']),
-               'nurl'     => $contact['nurl'], // We additionally store the nurl as identifier
-               'location' => $contact['location'],
-               'gender'   => $contact['gender'],
-               'about'    => $contact['about'],
-               'network => Strings::formatNetworkName($contact['network'], $contact['url']),
-               'tags'     => $contact['keywords'],
-               'bd'       => $contact['birthday'] <= DBA::NULL_DATE ? '' : $contact['birthday'],
+               'name'         => $contact['name'],
+               'nick'         => $contact['nick'],
+               'addr'         => defaults($contact, 'addr', $contact['url']),
+               'thumb'        => ProxyUtils::proxifyUrl($contact['thumb'], false, ProxyUtils::SIZE_THUMB),
+               'url'          => Contact::magicLink($contact['url']),
+               'nurl'         => $contact['nurl'], // We additionally store the nurl as identifier
+               'location'     => $contact['location'],
+               'gender'       => $contact['gender'],
+               'about'        => $contact['about'],
+               'network_link' => Strings::formatNetworkName($contact['network'], $contact['url']),
+               'tags'         => $contact['keywords'],
+               'bd'           => $contact['birthday'] <= DBA::NULL_DATE ? '' : $contact['birthday'],
                'account_type' => Contact::getAccountType($contact),
-               'actions'  => $actions,
+               'actions'      => $actions,
        ];
        if ($datatype == 'html') {
                $tpl = Renderer::getMarkupTemplate('hovercard.tpl');
index 887e35b72179a78e994affa7c577fc77eda6a79d..132f9f33449f81a76f175e70840c0eee12a6fbfe 100644 (file)
@@ -297,9 +297,9 @@ class Profile
                $profile['picdate'] = urlencode(defaults($profile, 'picdate', ''));
 
                if (($profile['network'] != '') && ($profile['network'] != Protocol::DFRN)) {
-                       $profile['network_name'] = Strings::formatNetworkName($profile['network'], $profile['url']);
+                       $profile['network_link'] = Strings::formatNetworkName($profile['network'], $profile['url']);
                } else {
-                       $profile['network_name'] = '';
+                       $profile['network_link'] = '';
                }
 
                Addon::callHooks('profile_sidebar_enter', $profile);
index c030f60f46bd0276103e2c0dc127036c16ebe4fc..410f5878bb3f9fb20d2f01c5f182f889f8e0c2ec 100644 (file)
@@ -75,18 +75,17 @@ class Contact extends BaseModule
                        $a->data['contact'] = $contact;
 
                        if (($contact['network'] != '') && ($contact['network'] != Protocol::DFRN)) {
-                               $networkname = Strings::formatNetworkName($contact['network'], $contact['url']);
+                               $network_link = Strings::formatNetworkName($contact['network'], $contact['url']);
                        } else {
-                               $networkname = '';
+                               $network_link = '';
                        }
 
-                       /// @TODO Add nice spaces
                        $vcard_widget = Renderer::replaceMacros(Renderer::getMarkupTemplate('vcard-widget.tpl'), [
                                '$name'         => $contact['name'],
                                '$photo'        => $contact['photo'],
                                '$url'          => Model\Contact::MagicLink($contact['url']),
                                '$addr'         => defaults($contact, 'addr', ''),
-                               '$network_name' => $networkname,
+                               '$network_link' => $network_link,
                                '$network'      => L10n::t('Network:'),
                                '$account_type' => Model\Contact::getAccountType($contact)
                        ]);
index 0c259c440e9bd38f6f67684b136a6e6333e51518..a688f57b202c1a25c16f21d868a24722e73f971b 100644 (file)
@@ -12,7 +12,7 @@
                                </div>
                                <div class="profile-details">
                                        <span class="profile-addr">{{$profile.addr}}</span>
-                                       {{if $profile.network}}<span class="profile-network"> ({{$profile.network}})</span>{{/if}}
+                                       {{if $profile.network_link}}<span class="profile-network">({{$profile.network_link nofilter}})</span>{{/if}}
                                </div>
                                {{*{{if $profile.about}}<div class="profile-details profile-about">{{$profile.about nofilter}}</div>{{/if}}*}}
 
index f10a21ca6c97b0a3fcb60e21c42fbf6bc41871fe..124fca154f16f965182c249a31b26e42208ea0f3 100644 (file)
@@ -13,7 +13,7 @@
                <div id="profile-photo-wrapper"><a href="{{$profile.url}}"><img class="photo u-photo" width="175" height="175" src="{{$profile.photo}}" alt="{{$profile.name}}"></a></div>
        {{/if}}
        {{if $account_type}}<div class="account-type">{{$account_type}}</div>{{/if}}
-       {{if $profile.network_name}}<dl class="network"><dt class="network-label">{{$network}}</dt><dd class="x-network">{{$profile.network_name nofilter}}</dd></dl>{{/if}}
+       {{if $profile.network_link}}<dl class="network"><dt class="network-label">{{$network}}</dt><dd class="x-network">{{$profile.network_link nofilter}}</dd></dl>{{/if}}
        {{if $location}}
                <dl class="location"><dt class="location-label">{{$location}}</dt> 
                <dd class="adr h-adr">
index 47b64b68dafe5d0f561b8071ff3e0340173d527c..240466460efff31630eb2baee11472f5db73d44a 100644 (file)
@@ -9,6 +9,6 @@
        <div id="profile-photo-wrapper"><img class="vcard-photo photo u-photo" style="width: 175px; height: 175px;" src="{{$photo}}" alt="{{$name}}" /></div>
        {{/if}}
        {{if $account_type}}<div class="account-type">{{$account_type}}</div>{{/if}}
-       {{if $network_name}}<dl class="network"><dt class="network-label">{{$network}}</dt><dd class="x-network">{{$network_name}}</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 id="profile-vcard-break"></div>
 </div>
index 502750794311bb0e9a1ebfba1ffcc4829a409c34..a7d0a0bc5adc13443c4fbc8d98782493385733d2 100644 (file)
@@ -10,7 +10,7 @@
 
        {{if $account_type}}<div class="account-type">{{$account_type}}</div>{{/if}}
 
-       {{if $profile.network_name}}<dl class="network"><dt class="network-label">{{$network}}</dt><dd class="x-network">{{$profile.network_name nofilter}}</dd></dl>{{/if}}
+       {{if $profile.network_link}}<dl class="network"><dt class="network-label">{{$network}}</dt><dd class="x-network">{{$profile.network_link nofilter}}</dd></dl>{{/if}}
 
        {{if $location}}
                <dl class="location"><dt class="location-label">{{$location}}</dt> 
index f65db725b2bcf8aaeab9e96b26e8a4a0554b993e..0eae2841bd3e200d19e06e5ca96017f7e5284c77 100644 (file)
@@ -32,7 +32,7 @@
 
                        {{if $account_type}}<div class="account-type">{{$account_type}}</div>{{/if}}
 
-                       {{if $network_name}}<dl class="network"><dt class="network-label">{{$network}}</dt><dd class="x-network">{{$network_name 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>
 </div>
index 6e81bd90cf6eda95b7025a57f7707c5169827378..68028fe91e97f100d46fa8732886059645eddb84 100644 (file)
@@ -33,7 +33,7 @@
 
        {{if $account_type}}<div class="account-type">{{$account_type}}</div>{{/if}}
 
-       {{if $profile.network_name}}<dl class="network"><dt class="network-label">{{$network}}</dt><dd class="x-network">{{$profile.network_name nofilter}}</dd></dl>{{/if}}
+       {{if $profile.network_link}}<dl class="network"><dt class="network-label">{{$network}}</dt><dd class="x-network">{{$profile.network_link nofilter}}</dd></dl>{{/if}}
 
        {{if $location}}
                <dl class="location"><dt class="location-label">{{$location}}</dt> 
index 2acca2fd09174677db2fbd2486e8700f43533b24..b37f5d25916b34cb69b23a3328f2d12b82c6d1b9 100644 (file)
@@ -24,7 +24,7 @@
        {{/if}}
 
        {{if $account_type}}<div class="account-type">{{$account_type}}</div>{{/if}}
-       {{if $profile.network_name}}<dl class="network"><dt class="network-label">{{$network}}</dt><dd class="x-network">{{$profile.network_name nofilter}}</dd></dl>{{/if}}
+       {{if $profile.network_link}}<dl class="network"><dt class="network-label">{{$network}}</dt><dd class="x-network">{{$profile.network_link nofilter}}</dd></dl>{{/if}}
        {{if $location}}
                <dl class="location"><dt class="location-label">{{$location}}</dt> 
                <dd class="adr h-adr">