Issue 5733: Removing contacts does work now on the same machine as well
This commit is contained in:
parent
dcb9bf4136
commit
96d10c25e3
4 changed files with 17 additions and 13 deletions
|
@ -79,13 +79,13 @@ function dfrn_notify_post(App $a) {
|
|||
$condition = [];
|
||||
switch ($direction) {
|
||||
case (-1):
|
||||
$condition = ["`issued-id` = ? OR `dfrn-id` = ?", $dfrn_id, $dfrn_id];
|
||||
$condition = ["(`issued-id` = ? OR `dfrn-id` = ?) AND `uid` = ?", $dfrn_id, $dfrn_id, $user['uid']];
|
||||
break;
|
||||
case 0:
|
||||
$condition = ['issued-id' => $dfrn_id, 'duplex' => true];
|
||||
$condition = ['issued-id' => $dfrn_id, 'duplex' => true, 'uid' => $user['uid']];
|
||||
break;
|
||||
case 1:
|
||||
$condition = ['dfrn-id' => $dfrn_id, 'duplex' => true];
|
||||
$condition = ['dfrn-id' => $dfrn_id, 'duplex' => true, 'uid' => $user['uid']];
|
||||
break;
|
||||
default:
|
||||
System::xmlExit(3, 'Invalid direction');
|
||||
|
@ -287,15 +287,15 @@ function dfrn_notify_content(App $a) {
|
|||
$condition = [];
|
||||
switch ($direction) {
|
||||
case (-1):
|
||||
$condition = ["`issued-id` = ? OR `dfrn-id` = ?", $dfrn_id, $dfrn_id];
|
||||
$condition = ["(`issued-id` = ? OR `dfrn-id` = ?) AND `uid` = ?", $dfrn_id, $dfrn_id, $user['uid']];
|
||||
$my_id = $dfrn_id;
|
||||
break;
|
||||
case 0:
|
||||
$condition = ['issued-id' => $dfrn_id, 'duplex' => true];
|
||||
$condition = ['issued-id' => $dfrn_id, 'duplex' => true, 'uid' => $user['uid']];
|
||||
$my_id = '1:' . $dfrn_id;
|
||||
break;
|
||||
case 1:
|
||||
$condition = ['dfrn-id' => $dfrn_id, 'duplex' => true];
|
||||
$condition = ['dfrn-id' => $dfrn_id, 'duplex' => true, 'uid' => $user['uid']];
|
||||
$my_id = '0:' . $dfrn_id;
|
||||
break;
|
||||
default:
|
||||
|
@ -326,7 +326,7 @@ function dfrn_notify_content(App $a) {
|
|||
$pub_key = trim($importer['cpubkey']);
|
||||
$dplx = intval($importer['duplex']);
|
||||
|
||||
if (($dplx && strlen($prv_key)) || (strlen($prv_key) && !strlen($pub_key))) {
|
||||
if (!empty($prv_key) && empty($pub_key)) {
|
||||
openssl_private_encrypt($hash, $challenge, $prv_key);
|
||||
openssl_private_encrypt($id_str, $encrypted_id, $prv_key);
|
||||
} elseif (strlen($pub_key)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue