include/follow cleanup
This commit is contained in:
parent
f2a0514917
commit
1aeea64311
@ -59,7 +59,7 @@ function new_contact($uid,$url,$channel,$interactive = false) {
|
|||||||
$total_channels = $r[0]['total'];
|
$total_channels = $r[0]['total'];
|
||||||
|
|
||||||
if(! service_class_allows($uid,'total_channels',$total_channels)) {
|
if(! service_class_allows($uid,'total_channels',$total_channels)) {
|
||||||
$result['message'] .= upgrade_message();
|
$result['message'] = upgrade_message();
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,8 +73,6 @@ function new_contact($uid,$url,$channel,$interactive = false) {
|
|||||||
|
|
||||||
$xchan_hash = $x['hash'];
|
$xchan_hash = $x['hash'];
|
||||||
|
|
||||||
// Do we already have an abook entry?
|
|
||||||
// go directly to the abook edit page.
|
|
||||||
|
|
||||||
$their_perms = 0;
|
$their_perms = 0;
|
||||||
|
|
||||||
@ -108,7 +106,7 @@ function new_contact($uid,$url,$channel,$interactive = false) {
|
|||||||
intval($uid)
|
intval($uid)
|
||||||
);
|
);
|
||||||
if(! $r) {
|
if(! $r) {
|
||||||
$result['message'] .= t('local account not found.');
|
$result['message'] = t('local account not found.');
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
$aid = $r[0]['channel_account_id'];
|
$aid = $r[0]['channel_account_id'];
|
||||||
@ -116,7 +114,7 @@ function new_contact($uid,$url,$channel,$interactive = false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($hash == $xchan_hash) {
|
if($hash == $xchan_hash) {
|
||||||
$result['message'] .= t('Cannot connect to yourself.');
|
$result['message'] = t('Cannot connect to yourself.');
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,8 +131,8 @@ function new_contact($uid,$url,$channel,$interactive = false) {
|
|||||||
else {
|
else {
|
||||||
$r = q("insert into abook ( abook_account, abook_channel, abook_xchan, abook_their_perms, abook_created, abook_updated )
|
$r = q("insert into abook ( abook_account, abook_channel, abook_xchan, abook_their_perms, abook_created, abook_updated )
|
||||||
values( %d, %d, '%s', %d, '%s', '%s' ) ",
|
values( %d, %d, '%s', %d, '%s', '%s' ) ",
|
||||||
intval(get_account_id()),
|
intval($aid),
|
||||||
intval(local_user()),
|
intval($uid),
|
||||||
dbesc($xchan_hash),
|
dbesc($xchan_hash),
|
||||||
intval($their_perms),
|
intval($their_perms),
|
||||||
dbesc(datetime_convert()),
|
dbesc(datetime_convert()),
|
||||||
|
Reference in New Issue
Block a user