Bugfix: You wasn't able to add an OStatus contact when you are following the same contact via Statusnet connector.
This commit is contained in:
parent
2856042824
commit
fae3592c79
|
@ -14,8 +14,11 @@ function follow_content(&$a) {
|
||||||
$uid = local_user();
|
$uid = local_user();
|
||||||
$url = notags(trim($_REQUEST['url']));
|
$url = notags(trim($_REQUEST['url']));
|
||||||
|
|
||||||
$r = q("SELECT `url` FROM `contact` WHERE `uid` = %d AND (`nurl` = '%s' OR `alias` = '%s' OR `alias` = '%s') LIMIT 1",
|
$r = q("SELECT `url` FROM `contact` WHERE `uid` = %d AND
|
||||||
intval(local_user()), dbesc(normalise_link($url)), dbesc(normalise_link($url)), dbesc($url));
|
(`nurl` = '%s' OR `alias` = '%s' OR `alias` = '%s') AND
|
||||||
|
`network` != '%s' LIMIT 1",
|
||||||
|
intval(local_user()), dbesc(normalise_link($url)),
|
||||||
|
dbesc(normalise_link($url)), dbesc($url), dbesc(NETWORK_STATUSNET));
|
||||||
|
|
||||||
if ($r) {
|
if ($r) {
|
||||||
notice(t('You already added this contact.').EOL);
|
notice(t('You already added this contact.').EOL);
|
||||||
|
|
Loading…
Reference in a new issue