X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Fcontact_widgets.php;h=5108eaf72390b9fec662031590ec0fba3e78e6da;hb=898fe2db1e41ab2401f43e38146e3409d11852b3;hp=01329513bbfd04896d88a5e74ca68b8629651da2;hpb=cd1724eb9ef4e07ced4c9019dd7bad55dc21abce;p=friendica.git diff --git a/include/contact_widgets.php b/include/contact_widgets.php index 01329513bb..5108eaf723 100644 --- a/include/contact_widgets.php +++ b/include/contact_widgets.php @@ -1,9 +1,10 @@ normalise_link(get_my_url()), 'uid' => $profile_uid), array('limit' => 1)); - if (dbm::is_result($r)) { + if (DBM::is_result($r)) { $cid = $r['id']; } else { $r = dba::select('gcontact', array('id'), array('nurl' => normalise_link(get_my_url())), array('limit' => 1)); - if (dbm::is_result($r)) + if (DBM::is_result($r)) $zcid = $r['id']; } } @@ -247,31 +246,28 @@ function common_friends_visitor_widget($profile_uid) { return; } - require_once 'include/socgraph.php'; - if ($cid) { - $t = count_common_friends($profile_uid, $cid); + $t = GlobalContact::countCommonFriends($profile_uid, $cid); } else { - $t = count_common_friends_zcid($profile_uid, $zcid); + $t = GlobalContact::countCommonFriendsZcid($profile_uid, $zcid); } if (! $t) { return; } if ($cid) { - $r = common_friends($profile_uid, $cid, 0, 5, true); + $r = GlobalContact::commonFriends($profile_uid, $cid, 0, 5, true); } else { - $r = common_friends_zcid($profile_uid, $zcid, 0, 5, true); + $r = GlobalContact::commonFriendsZcid($profile_uid, $zcid, 0, 5, true); } return replace_macros(get_markup_template('remote_friends_common.tpl'), array( - '$desc' => sprintf( tt("%d contact in common", "%d contacts in common", $t), $t), + '$desc' => sprintf(tt("%d contact in common", "%d contacts in common", $t), $t), '$base' => System::baseUrl(), '$uid' => $profile_uid, '$cid' => (($cid) ? $cid : '0'), '$linkmore' => (($t > 5) ? 'true' : ''), '$more' => t('show more'), - '$items' => $r - )); - -}; + '$items' => $r) + ); +}