1
0
Fork 0

Small cleanup (#5416)

- 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>
This commit is contained in:
Roland Häder 2018-07-20 00:39:05 +02:00 committed by Hypolite Petovan
parent bc5cf8f3c1
commit b2899d76cf
2 changed files with 4 additions and 2 deletions

View 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);
}

View 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;