]> git.mxchange.org Git - friendica.git/blobdiff - mod/hovercard.php
Merge pull request #5224 from rabuzarus/20180615_-_frio_frix_js_error_callAddonHooks
[friendica.git] / mod / hovercard.php
index 0bd1d261782e594ce42eeedd3b195c582326bf90..2fb7b8cc7829140930f3f9373cae5ede3ac90199 100644 (file)
@@ -9,10 +9,10 @@
  */
 use Friendica\App;
 use Friendica\Core\Config;
+use Friendica\Core\System;
 use Friendica\Model\Contact;
 use Friendica\Model\GContact;
 use Friendica\Model\Profile;
-use Friendica\Util\Network;
 
 function hovercard_init(App $a)
 {
@@ -27,7 +27,7 @@ function hovercard_content()
 
        // Get out if the system doesn't have public access allowed
        if (intval(Config::get('system', 'block_public'))) {
-               Network::httpStatusExit(401);
+               System::httpExit(401);
        }
 
        // Return the raw content of the template. We use this to make templates usable for js functions.
@@ -72,7 +72,7 @@ function hovercard_content()
                'nick'     => $contact['nick'],
                'addr'     => defaults($contact, 'addr', $contact['url']),
                'thumb'    => proxy_url($contact['thumb'], false, PROXY_SIZE_THUMB),
-               'url'      => $cid ? ('redir/' . $cid) : Profile::zrl($contact['url']),
+               'url'      => Contact::magicLink($contact['url']),
                'nurl'     => $contact['nurl'], // We additionally store the nurl as identifier
                'location' => $contact['location'],
                'gender'   => $contact['gender'],
@@ -91,7 +91,7 @@ function hovercard_content()
 
                return $o;
        } else {
-               Network::jsonExit($profile);
+               System::jsonExit($profile);
        }
 }