From 226bda9f58254bf2b77cd5e323385537f6dfe25f Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Sat, 28 Nov 2015 03:50:45 +0100 Subject: [PATCH] add missing info about if contact is forum to contact related pages --- mod/dirfind.php | 1 + mod/match.php | 1 + mod/suggest.php | 7 ++++--- mod/viewcontacts.php | 7 ++++--- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/mod/dirfind.php b/mod/dirfind.php index 6a4c7f1ced..3f9c82576a 100644 --- a/mod/dirfind.php +++ b/mod/dirfind.php @@ -205,6 +205,7 @@ function dirfind_content(&$a, $prefix = "") { 'details' => $contact_details['location'], 'tags' => $contact_details['keywords'], 'about' => $contact_details['about'], + 'account_type' => (($contact_details['community']) ? t('Forum') : ''), 'network' => network_to_name($jj->network, $jj->url), 'id' => ++$id, ); diff --git a/mod/match.php b/mod/match.php index db1cac0f78..3b0367b429 100644 --- a/mod/match.php +++ b/mod/match.php @@ -79,6 +79,7 @@ function match_content(&$a) { 'details' => $contact_details['location'], 'tags' => $contact_details['keywords'], 'about' => $contact_details['about'], + 'account_type' => (($contact_details['community']) ? t('Forum') : ''), 'thumb' => proxy_url($jj->photo, false, PROXY_SIZE_THUMB), 'inttxt' => ' ' . t('is interested in:'), 'conntxt' => t('Connect'), diff --git a/mod/suggest.php b/mod/suggest.php index 578338b505..b73c2cd1b6 100644 --- a/mod/suggest.php +++ b/mod/suggest.php @@ -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']) ); @@ -90,8 +90,9 @@ function suggest_content(&$a) { 'name' => $rr['name'], 'thumb' => proxy_url($rr['photo'], 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' => (($contact_details['community']) ? t('Forum') : ''), 'ignlnk' => $ignlnk, 'ignid' => $rr['id'], 'conntxt' => t('Connect'), diff --git a/mod/viewcontacts.php b/mod/viewcontacts.php index f199574c69..c7f139e1e4 100644 --- a/mod/viewcontacts.php +++ b/mod/viewcontacts.php @@ -26,7 +26,7 @@ function viewcontacts_content(&$a) { } - $r = q("SELECT COUNT(*) as `total` FROM `contact` WHERE `uid` = %d AND `blocked` = 0 AND `pending` = 0 AND `hidden` = 0 AND `archive` = 0 ", + $r = q("SELECT COUNT(*) AS `total` FROM `contact` WHERE `uid` = %d AND `blocked` = 0 AND `pending` = 0 AND `hidden` = 0 AND `archive` = 0 ", intval($a->profile['uid']) ); if(count($r)) @@ -68,8 +68,9 @@ function viewcontacts_content(&$a) { 'name' => htmlentities(substr($rr['name'],0,20)), 'username' => htmlentities($rr['name']), 'details' => $contact_details['location'], - 'tags' => $contact_details['keywords'], - 'about' => $contact_details['about'], + 'tags' => $contact_details['keywords'], + 'about' => $contact_details['about'], + 'account_type' => (($contact_details['community']) ? t('Forum') : ''), 'url' => $url, 'sparkle' => '', 'itemurl' => (($contact_details['addr'] != "") ? $contact_details['addr'] : $rr['url']), -- 2.39.5