]> git.mxchange.org Git - friendica.git/commitdiff
Replace old database queries with the new ones
authorMichael <heluecht@pirati.ca>
Wed, 2 May 2018 19:26:15 +0000 (19:26 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 14 May 2018 20:50:04 +0000 (22:50 +0200)
mod/message.php
mod/settings.php
src/Protocol/DFRN.php

index 6a48eb658e523317e7e7f681fb9f27e6a1b5cfd1..822f5aadeceaa2d34d5b77ca1057548f11600fa4 100644 (file)
@@ -148,7 +148,7 @@ function message_content(App $a)
 
                $cmd = $a->argv[1];
                if ($cmd === 'drop') {
-                       if (dba::delete('mail', ['id' => $a->argv[2], 'uid' => local_user()])) {
+                       if (dba::delete('mail', ['id' => $a->argv[2]])) {
                                info(L10n::t('Message deleted.') . EOL);
                        }
                        //goaway(System::baseUrl(true) . '/message' );
index c7e61cbe3b3fcd30072fda802e88898b848a1906..234731439f5a1cace16fbef8efa8737a7ff0f181 100644 (file)
@@ -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, 'uid' => local_user()]);
+               dba::delete('tokens', ['id' => $key]);
                goaway(System::baseUrl(true)."/settings/oauth/");
                return;
        }
index eb44cb210a55db0969a88cc758723053eda1d25b..592444e3ca513e0be25eff044b2c601aec91e27b 100644 (file)
@@ -2094,7 +2094,6 @@ 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);
 
                // @TODO No dba:update here?
                dba::update('contact', $fields, $condition);
@@ -2103,11 +2102,6 @@ class DFRN
 
                logger('Contacts are updated.');
 
-               /// @TODO WHERE DOES $x COME FROM ???
-               if ($x === false) {
-                       return false;
-               }
-
                // update items
                // This is an extreme performance killer
                Item::update(['owner-link' => $relocate["url"]], ['owner-link' => $old["url"], 'uid' => $importer["importer_uid"]]);