]> git.mxchange.org Git - friendica.git/blobdiff - mod/hovercard.php
Merge remote-tracking branch 'upstream/develop' into 1612-unused-indexes
[friendica.git] / mod / hovercard.php
index f5c410e11169875152cde20eae67bba0799a9935..553d5d2232f9116559b4f397c9ab01c112793599 100644 (file)
@@ -11,7 +11,7 @@
 require_once("include/socgraph.php");
 require_once("include/Contact.php");
 
-function hovercard_init(&$a) {
+function hovercard_init(App &$a) {
        // Just for testing purposes
        $_GET["mode"] = "minimal";
 }
@@ -48,11 +48,6 @@ function hovercard_content() {
        if($nurl) {
                // Search for contact data
                $contact = get_contact_details_by_url($nurl);
-
-               // Get_contact_details_by_url() doesn't provide the nurl but we
-               // need it for the photo_menu, so we copy it to the contact array
-               if (!isset($contact["nurl"]))
-                       $contact["nurl"] = $nurl;
        }
 
        if(!is_array($contact))
@@ -69,7 +64,7 @@ function hovercard_content() {
                'name' => $contact["name"],
                'nick'  => $contact["nick"],
                'addr'  => (($contact["addr"] != "") ? $contact["addr"] : $contact["url"]),
-               'thumb' => proxy_url($contact["photo"], false, PROXY_SIZE_THUMB),
+               'thumb' => proxy_url($contact["thumb"], false, PROXY_SIZE_THUMB),
                'url' => ($cid ? ("redir/".$cid) : zrl($contact["url"])),
                'nurl' => $contact["nurl"], // We additionally store the nurl as identifier
 //             'alias' => $contact["alias"],
@@ -77,15 +72,14 @@ function hovercard_content() {
                'gender' => $contact["gender"],
                'about' => $contact["about"],
                'network' => format_network_name($contact["network"], $contact["url"]),
-               'tags' => intval($contact["keywords"]),
+               'tags' => $contact["keywords"],
 //             'nsfw' => intval($contact["nsfw"]),
 //             'server_url' => $contact["server_url"],
                'bd' => (($contact["birthday"] == "0000-00-00") ? "" : $contact["birthday"]),
 //             'generation' => $contact["generation"],
-               'account_type' => ($contact['community'] ? t("Forum") : ""),
+               'account_type' => account_type($contact),
                'actions' => $actions,
        );
-
        if($datatype == "html") {
                $t = get_markup_template("hovercard.tpl");