X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fmatch.php;h=69bf3c1101142f33bdd98c3ef40669d12f0d46c5;hb=a9bed1422e0a476df17a9e6edefce1925404184d;hp=5da1e036c358a8eda3a43692f69cd615fa0bb679;hpb=0c3979720f0a2509cbc50662b4eba992ff81af13;p=friendica.git diff --git a/mod/match.php b/mod/match.php index 5da1e036c3..69bf3c1101 100644 --- a/mod/match.php +++ b/mod/match.php @@ -27,8 +27,9 @@ function match_content(&$a) { $r = q("SELECT `pub_keywords`, `prv_keywords` FROM `profile` WHERE `is-default` = 1 AND `uid` = %d LIMIT 1", intval(local_user()) ); - if(! count($r)) + if (! dbm::is_result($r)) { return; + } if(! $r[0]['pub_keywords'] && (! $r[0]['prv_keywords'])) { notice( t('No keywords to match. Please add keywords to your default profile.') . EOL); return; @@ -67,12 +68,21 @@ function match_content(&$a) { if (!count($match)) { $jj->photo = str_replace("http:///photo/", get_server()."/photo/", $jj->photo); $connlnk = $a->get_baseurl() . '/follow/?url=' . $jj->url; - $photo_menu = array(array(t("View Profile"), zrl($jj->url))); - $photo_menu[] = array(t("Connect/Follow"), $connlnk); + $photo_menu = array( + 'profile' => array(t("View Profile"), zrl($jj->url)), + 'follow' => array(t("Connect/Follow"), $connlnk) + ); + + $contact_details = get_contact_details_by_url($jj->url, local_user()); $entry = array( 'url' => zrl($jj->url), + 'itemurl' => (($contact_details['addr'] != "") ? $contact_details['addr'] : $jj->url), 'name' => $jj->name, + 'details' => $contact_details['location'], + 'tags' => $contact_details['keywords'], + 'about' => $contact_details['about'], + 'account_type' => account_type($contact_details), 'thumb' => proxy_url($jj->photo, false, PROXY_SIZE_THUMB), 'inttxt' => ' ' . t('is interested in:'), 'conntxt' => t('Connect'), @@ -81,8 +91,8 @@ function match_content(&$a) { 'photo_menu' => $photo_menu, 'id' => ++$id, ); + $entries[] = $entry; } - $entries[] = $entry; } $tpl = get_markup_template('viewcontact_template.tpl');