yet another bug in remote_friends_in_common
This commit is contained in:
parent
f2d3039aed
commit
15542a8690
|
@ -143,7 +143,7 @@ function common_friends_visitor_widget($profile_uid) {
|
||||||
$cid = $zcid = 0;
|
$cid = $zcid = 0;
|
||||||
|
|
||||||
if(can_write_wall($a,$profile_uid))
|
if(can_write_wall($a,$profile_uid))
|
||||||
$cid = local_user();
|
$cid = remote_user();
|
||||||
else {
|
else {
|
||||||
if(get_my_url()) {
|
if(get_my_url()) {
|
||||||
$r = q("select id from contact where nurl = '%s' and uid = %d limit 1",
|
$r = q("select id from contact where nurl = '%s' and uid = %d limit 1",
|
||||||
|
|
|
@ -176,6 +176,7 @@ function count_common_friends($uid,$cid) {
|
||||||
intval($cid)
|
intval($cid)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// logger("count_common_friends: $uid $cid {$r[0]['total']}");
|
||||||
if(count($r))
|
if(count($r))
|
||||||
return $r[0]['total'];
|
return $r[0]['total'];
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue