Merge pull request #1547 from tobiasd/2014-05-06-match
avoid some contacts from profile match listing
This commit is contained in:
commit
362d3214ba
1 changed files with 8 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
include_once('include/text.php');
|
||||||
|
|
||||||
function match_content(&$a) {
|
function match_content(&$a) {
|
||||||
|
|
||||||
|
@ -48,17 +48,23 @@ 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 = normalise_link($jj->url);
|
||||||
|
$match = q("SELECT `nurl` FROM `contact` WHERE `uid` = '%d' AND nurl='%s' LIMIT 1",
|
||||||
|
intval(local_user()),
|
||||||
|
dbesc($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(
|
||||||
'$url' => zrl($jj->url),
|
'$url' => zrl($jj->url),
|
||||||
'$name' => $jj->name,
|
'$name' => $jj->name,
|
||||||
'$photo' => $jj->photo,
|
'$photo' => proxy_url($jj->photo),
|
||||||
'$inttxt' => ' ' . t('is interested in:'),
|
'$inttxt' => ' ' . t('is interested in:'),
|
||||||
'$conntxt' => t('Connect'),
|
'$conntxt' => t('Connect'),
|
||||||
'$connlnk' => $connlnk,
|
'$connlnk' => $connlnk,
|
||||||
'$tags' => $jj->tags
|
'$tags' => $jj->tags
|
||||||
));
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in a new issue