]> git.mxchange.org Git - friendica.git/commitdiff
avoid some contacts from profile match listing
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Wed, 6 May 2015 11:02:02 +0000 (13:02 +0200)
committerTobias Diekershoff <tobias.diekershoff@gmx.net>
Wed, 6 May 2015 11:02:02 +0000 (13:02 +0200)
mod/match.php

index 926df1dfff3203dafee764c8b0eeec107b57601b..96a6efc303187d7dbe3cf6db9fb57adf83db909b 100644 (file)
@@ -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 {