1
1
Fork 0

Merge pull request #2748 from rabuzarus/rabuzarus-pending

best_link_url: don't use redirect for pending contacts
This commit is contained in:
Tobias Diekershoff 2016-08-31 15:55:26 +02:00 committed by GitHub
commit 02c29f1313

View file

@ -887,7 +887,7 @@ function best_link_url($item,&$sparkle,$ssl_state = false) {
$clean_url = normalise_link($item['author-link']);
if (local_user()) {
$r = q("SELECT `id` FROM `contact` WHERE `network` = '%s' AND `uid` = %d AND `nurl` = '%s' LIMIT 1",
$r = q("SELECT `id` FROM `contact` WHERE `network` = '%s' AND `uid` = %d AND `nurl` = '%s' AND NOT `pending` LIMIT 1",
dbesc(NETWORK_DFRN), intval(local_user()), dbesc(normalise_link($clean_url)));
if ($r) {
$best_url = 'redir/'.$r[0]['id'];