]> git.mxchange.org Git - friendica.git/commitdiff
Small cleanup (#5416)
authorRoland Häder <Quix0r@users.noreply.github.com>
Thu, 19 Jul 2018 22:39:05 +0000 (00:39 +0200)
committerHypolite Petovan <mrpetovan@eml.cc>
Thu, 19 Jul 2018 22:39:05 +0000 (18:39 -0400)
- added internal TODO to decide about is_result() usage
- removed semicolon (not needed here) from SQL query
- added empty line

Signed-off-by: Roland Häder <roland@mxchange.org>
mod/profiles.php
src/Protocol/DFRN.php

index 9c925924f78c1a1db01759465d3a2d2190d8338c..3ceb8c664599f5cb92fb9c888c57013a0fa9ad26 100644 (file)
@@ -479,6 +479,7 @@ function profiles_post(App $a) {
                        intval(local_user())
                );
 
+               /// @TODO decide to use dbm::is_result() here and check $r
                if ($r) {
                        info(L10n::t('Profile updated.') . EOL);
                }
index 8cc148ff94dd8dd0a88b7de7e77316e3409409d2..5326e49ac9ee67329bb938be399adc760ede9313 100644 (file)
@@ -1978,7 +1978,7 @@ class DFRN
                 * link an introduction to it.
                 */
                if (!DBM::is_result($r)) {
-                       // database record did not get created. Quietly give up.
+                       // Database record did not get created. Quietly give up.
                        killme();
                }
 
@@ -2058,7 +2058,7 @@ class DFRN
 
                // update contact
                $r = q(
-                       "SELECT `photo`, `url` FROM `contact` WHERE `id` = %d AND `uid` = %d;",
+                       "SELECT `photo`, `url` FROM `contact` WHERE `id` = %d AND `uid` = %d",
                        intval($importer["id"]),
                        intval($importer["importer_uid"])
                );
@@ -2332,6 +2332,7 @@ class DFRN
 
                                if ($xt->type == ACTIVITY_OBJ_NOTE) {
                                        $item_tag = Item::selectFirst(['id', 'tag'], ['uri' => $xt->id, 'uid' => $importer["importer_uid"]]);
+
                                        if (!DBM::is_result($item_tag)) {
                                                logger("Query failed to execute, no result returned in " . __FUNCTION__);
                                                return false;