]> git.mxchange.org Git - friendica.git/blobdiff - mod/hovercard.php
Normalize expected format for event fields summary, desc and location
[friendica.git] / mod / hovercard.php
index d35de1a7fa6856fa6cbf9472da0efd5ce3098c4c..6160642762a4adcbc427d6f21b048fa62df60c19 100644 (file)
@@ -56,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;
        }
@@ -74,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);
        }
 
@@ -107,7 +107,7 @@ function hovercard_content()
                'about'    => $contact['about'],
                'network'  => Strings::formatNetworkName($contact['network'], $contact['url']),
                'tags'     => $contact['keywords'],
-               'bd'       => $contact['birthday'] <= '0001-01-01' ? '' : $contact['birthday'],
+               'bd'       => $contact['birthday'] <= DBA::NULL_DATE ? '' : $contact['birthday'],
                'account_type' => Contact::getAccountType($contact),
                'actions'  => $actions,
        ];