X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=twitter%2Ftwitter.php;h=47b4fa0751064123690570b4419ee6945df68811;hb=3c78130b41c3b19de6bd0622aa95d5ea6baa3fcf;hp=bf85f081702aa35fd98580cdfd1fcc10596742f5;hpb=215a18093a2822ccd0ba40b7b07142780bfd917b;p=friendica-addons.git diff --git a/twitter/twitter.php b/twitter/twitter.php index bf85f081..47b4fa07 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -571,11 +571,7 @@ function twitter_post_hook(App $a, &$b) $image = ""; } elseif ($iscomment) { logger('twitter_post: Update extid ' . $result->id_str . " for post id " . $b['id']); - q("UPDATE `item` SET `extid` = '%s', `body` = '%s' WHERE `id` = %d", - dbesc("twitter::" . $result->id_str), - dbesc($result->text), - intval($b['id']) - ); + Item::update(['extid' => "twitter::" . $result->id_str, 'body' => $result->text], ['id' => $b['id']]); } } @@ -621,10 +617,7 @@ function twitter_post_hook(App $a, &$b) notice(L10n::t('Twitter post failed. Queued for retry.') . EOL); } elseif ($iscomment) { logger('twitter_post: Update extid ' . $result->id_str . " for post id " . $b['id']); - q("UPDATE `item` SET `extid` = '%s' WHERE `id` = %d", - dbesc("twitter::" . $result->id_str), - intval($b['id']) - ); + Item::update(['extid' => "twitter::" . $result->id_str], ['id' => $b['id']]); } } }