X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fsuggest.php;h=00033b2d246feba8b84f961dc4edf4a8587844aa;hb=0adff6f6b893bd7562547bb00021f358383f51ba;hp=8f5f4f6a128b05cd20afea3083dc169ead318e5e;hpb=0c67c89715df801e0c887be50c9739db3bae7ca3;p=friendica.git diff --git a/mod/suggest.php b/mod/suggest.php index 8f5f4f6a12..00033b2d24 100644 --- a/mod/suggest.php +++ b/mod/suggest.php @@ -3,7 +3,7 @@ require_once('include/socgraph.php'); require_once('include/contact_widgets.php'); -if(! function_exists('suggest_init')) { + function suggest_init(&$a) { if(! local_user()) return; @@ -42,13 +42,13 @@ function suggest_init(&$a) { ); } } + } -} -if(! function_exists('suggest_content')) { + function suggest_content(&$a) { require_once("mod/proxy.php"); @@ -78,17 +78,20 @@ 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'], @@ -110,9 +113,8 @@ function suggest_content(&$a) { $o .= replace_macros($tpl,array( '$title' => t('Friend Suggestions'), '$contacts' => $entries, - + )); return $o; } -}