From eecd1e47e4752f6a71f944455dd95fc837683cad Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 2 May 2018 21:12:48 +0000 Subject: [PATCH] Some corrections --- mod/message.php | 2 +- mod/settings.php | 2 +- src/Protocol/DFRN.php | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mod/message.php b/mod/message.php index 822f5aadec..6a48eb658e 100644 --- a/mod/message.php +++ b/mod/message.php @@ -148,7 +148,7 @@ function message_content(App $a) $cmd = $a->argv[1]; if ($cmd === 'drop') { - if (dba::delete('mail', ['id' => $a->argv[2]])) { + if (dba::delete('mail', ['id' => $a->argv[2], 'uid' => local_user()])) { info(L10n::t('Message deleted.') . EOL); } //goaway(System::baseUrl(true) . '/message' ); diff --git a/mod/settings.php b/mod/settings.php index 234731439f..c7e61cbe3b 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -149,7 +149,7 @@ function settings_post(App $a) check_form_security_token_redirectOnErr('/settings/oauth', 'settings_oauth'); $key = $_POST['remove']; - dba::delete('tokens', ['id' => $key]); + dba::delete('tokens', ['id' => $key, 'uid' => local_user()]); goaway(System::baseUrl(true)."/settings/oauth/"); return; } diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index f5e8f3a508..5af1ddc5d8 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -2091,6 +2091,7 @@ class DFRN 'confirm' => $relocate["confirm"], 'notify' => $relocate["notify"], 'poll' => $relocate["poll"], 'site-pubkey' => $relocate["sitepubkey"]]; $condition = ["(`id` = ?) OR (`nurl` = ?)", $importer["id"], normalise_link($old["url"])]; + dba::update('contact', $fields, $condition); Contact::updateAvatar($relocate["avatar"], $importer["importer_uid"], $importer["id"], true); -- 2.39.5