- if($ret['network'] === NETWORK_DFRN) {
- if($interactive) {
- if(strlen($a->path))
- $myaddr = bin2hex($a->get_baseurl() . '/profile/' . $a->user['nickname']);
- else
+ if ($ret['network'] === NETWORK_DFRN) {
+ if ($interactive) {
+ if (strlen($a->path)) {
+ $myaddr = bin2hex(App::get_baseurl() . '/profile/' . $a->user['nickname']);
+ }
+ else {
$r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `nurl` = '%s' AND `network` = '%s' LIMIT 1",
intval($uid), dbesc(normalise_link($url)), dbesc($ret['network'])
);
$r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `nurl` = '%s' AND `network` = '%s' LIMIT 1",
intval($uid), dbesc(normalise_link($url)), dbesc($ret['network'])
);
// update contact
if($r[0]['rel'] == CONTACT_IS_FOLLOWER || ($network === NETWORK_DIASPORA && $r[0]['rel'] == CONTACT_IS_SHARING)) {
q("UPDATE `contact` SET `rel` = %d , `subhub` = %d, `readonly` = 0 WHERE `id` = %d AND `uid` = %d",
// update contact
if($r[0]['rel'] == CONTACT_IS_FOLLOWER || ($network === NETWORK_DIASPORA && $r[0]['rel'] == CONTACT_IS_SHARING)) {
q("UPDATE `contact` SET `rel` = %d , `subhub` = %d, `readonly` = 0 WHERE `id` = %d AND `uid` = %d",
$total_contacts = $r[0]['total'];
if(! service_class_allows($uid,'total_contacts',$total_contacts)) {
$total_contacts = $r[0]['total'];
if(! service_class_allows($uid,'total_contacts',$total_contacts)) {
$total_network = $r[0]['total'];
if(! service_class_allows($uid,'total_contacts_' . $network,$total_network)) {
$total_network = $r[0]['total'];
if(! service_class_allows($uid,'total_contacts_' . $network,$total_network)) {
$slap = ostatus::salmon($item, $r[0]);
slapper($r[0], $contact['notify'], $slap);
}
$slap = ostatus::salmon($item, $r[0]);
slapper($r[0], $contact['notify'], $slap);
}