Issue 5733: Removing contacts does work now on the same machine as well

This commit is contained in:
Michael 2018-09-12 06:05:14 +00:00
parent dcb9bf4136
commit 96d10c25e3
4 changed files with 17 additions and 13 deletions

View file

@ -1280,10 +1280,7 @@ class DFRN
}
}
if (($contact['duplex'] && strlen($contact['pubkey']))
|| ($owner['page-flags'] == Contact::PAGE_COMMUNITY && strlen($contact['pubkey']))
|| ($contact['rel'] == Contact::SHARING && strlen($contact['pubkey']))
) {
if (empty($contact['prvkey']) && !empty($contact['pubkey'])) {
openssl_public_decrypt($sent_dfrn_id, $final_dfrn_id, $contact['pubkey']);
openssl_public_decrypt($challenge, $postvars['challenge'], $contact['pubkey']);
} else {

View file

@ -13,8 +13,8 @@ require_once 'include/dba.php';
class RemoveContact {
public static function execute($id) {
// Only delete if the contact is archived
$condition = ['archive' => true, 'network' => Protocol::PHANTOM, 'id' => $id];
// Only delete if the contact is to be deleted
$condition = ['network' => Protocol::PHANTOM, 'id' => $id];
$r = DBA::exists('contact', $condition);
if (!DBA::isResult($r)) {
return;