]> git.mxchange.org Git - friendica.git/blobdiff - mod/suggest.php
fix accidentally deleted line with local_user()
[friendica.git] / mod / suggest.php
index 578338b5058055ff85d57dbb22d7c6abff4aab9f..4399450eccf2a1330882886d10e9923bc820e383 100644 (file)
@@ -36,7 +36,7 @@ function suggest_init(&$a) {
                }
                // Now check how the user responded to the confirmation query
                if(!$_REQUEST['canceled']) {
-                       q("insert into gcign ( uid, gcid ) values ( %d, %d ) ",
+                       q("INSERT INTO `gcign` ( `uid`, `gcid` ) VALUES ( %d, %d ) ",
                                intval(local_user()),
                                intval($_GET['ignore'])
                        );
@@ -78,20 +78,24 @@ function suggest_content(&$a) {
 
                $connlnk = $a->get_baseurl() . '/follow/?url=' . (($rr['connect']) ? $rr['connect'] : $rr['url']);
                $ignlnk = $a->get_baseurl() . '/suggest?ignore=' . $rr['id'];
-               $photo_menu = array(array(t("View Profile"), zrl($rr["url"])));
-               $photo_menu[] = array(t("Connect/Follow"), $connlnk);
-               $photo_menu[] = array(t('Ignore/Hide'), $ignlnk);
-               $contact_details = get_contact_details_by_url($rr["url"], local_user());
+               $photo_menu = array(
+                       'profile' => array(t("View Profile"), zrl($rr["url"])),
+                       'follow' => array(t("Connect/Follow"), $connlnk),
+                       'hide' => array(t('Ignore/Hide'), $ignlnk)
+               );
+
+               $contact_details = get_contact_details_by_url($rr["url"], local_user(), $rr);
 
                $entry = array(
                        'url' => zrl($rr['url']),
                        'itemurl' => (($contact_details['addr'] != "") ? $contact_details['addr'] : $rr['url']),
                        'img_hover' => $rr['url'],
-                       'name' => $rr['name'],
-                       'thumb' => proxy_url($rr['photo'], false, PROXY_SIZE_THUMB),
+                       'name' => $contact_details['name'],
+                       'thumb' => proxy_url($contact_details['thumb'], false, PROXY_SIZE_THUMB),
                        'details'       => $contact_details['location'],
-                        'tags'          => $contact_details['keywords'],
-                        'about'         => $contact_details['about'],
+                       'tags'          => $contact_details['keywords'],
+                       'about'         => $contact_details['about'],
+                       'account_type'  => account_type($contact_details),
                        'ignlnk' => $ignlnk,
                        'ignid' => $rr['id'],
                        'conntxt' => t('Connect'),
@@ -109,7 +113,6 @@ function suggest_content(&$a) {
        $o .= replace_macros($tpl,array(
                '$title' => t('Friend Suggestions'),
                '$contacts' => $entries,
-               
        ));
 
        return $o;