]> git.mxchange.org Git - friendica.git/blobdiff - mod/hovercard.php
update to the en gb and us translations THX Andy H3
[friendica.git] / mod / hovercard.php
index 1e2e14afb634b8bd74151c31df8881be0ae4e189..101ebd5af2e4e1b9068e9550368ef7bad137565c 100644 (file)
@@ -16,6 +16,7 @@ use Friendica\Database\DBA;
 use Friendica\Model\Contact;
 use Friendica\Model\GContact;
 use Friendica\Util\Proxy as ProxyUtils;
+use Friendica\Util\Strings;
 
 function hovercard_init(App $a)
 {
@@ -55,7 +56,7 @@ function hovercard_content()
 
        $contact = [];
        // if it's the url containing https it should be converted to http
-       $nurl = normalise_link(GContact::cleanContactUrl($profileurl));
+       $nurl = Strings::normaliseLink(GContact::cleanContactUrl($profileurl));
        if (!$nurl) {
                return;
        }
@@ -73,12 +74,12 @@ function hovercard_content()
 
        // Feeds url could have been destroyed through "cleanContactUrl", so we now use the original url
        if (!count($contact) && local_user()) {
-               $nurl = normalise_link($profileurl);
+               $nurl = Strings::normaliseLink($profileurl);
                $contact = Contact::getDetailsByURL($nurl, local_user());
        }
 
        if (!count($contact)) {
-               $nurl = normalise_link($profileurl);
+               $nurl = Strings::normaliseLink($profileurl);
                $contact = Contact::getDetailsByURL($nurl);
        }
 
@@ -95,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'  => format_network_name($contact['network'], $contact['url']),
-               'tags'     => $contact['keywords'],
-               'bd'       => $contact['birthday'] <= '0001-01-01' ? '' : $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');