1
1
Fork 0

avoid some contacts from profile match listing

This commit is contained in:
Tobias Diekershoff 2015-05-06 13:02:02 +02:00
parent da23543ffd
commit fd8c9a9dac

View file

@ -48,6 +48,11 @@ function match_content(&$a) {
$tpl = get_markup_template('match.tpl'); $tpl = get_markup_template('match.tpl');
foreach($j->results as $jj) { foreach($j->results as $jj) {
$match_nurl = str_replace(array('https:','//www.'), array('http:','//'), $jj->url);
$match = q("SELECT `nurl` FROM `contact` WHERE `uid` = '%d' AND nurl='%s' LIMIT 1",
intval(local_user()),
$match_nurl);
if (!count($match)) {
$connlnk = $a->get_baseurl() . '/follow/?url=' . $jj->url; $connlnk = $a->get_baseurl() . '/follow/?url=' . $jj->url;
$o .= replace_macros($tpl,array( $o .= replace_macros($tpl,array(
@ -59,6 +64,7 @@ function match_content(&$a) {
'$connlnk' => $connlnk, '$connlnk' => $connlnk,
'$tags' => $jj->tags '$tags' => $jj->tags
)); ));
}
} }
} }
else { else {