From fd8c9a9dacce946fd4f5698601c03cb59902f7bf Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 6 May 2015 13:02:02 +0200 Subject: [PATCH] avoid some contacts from profile match listing --- mod/match.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mod/match.php b/mod/match.php index 926df1dff..96a6efc30 100644 --- a/mod/match.php +++ b/mod/match.php @@ -48,6 +48,11 @@ function match_content(&$a) { $tpl = get_markup_template('match.tpl'); 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; $o .= replace_macros($tpl,array( @@ -59,6 +64,7 @@ function match_content(&$a) { '$connlnk' => $connlnk, '$tags' => $jj->tags )); + } } } else {