]> git.mxchange.org Git - friendica-addons.git/blobdiff - statusnet/statusnet.php
Direct calls to the database are replace by class calls to the item class
[friendica-addons.git] / statusnet / statusnet.php
index 22e8f5f9c28256032b5283fc464010951b85623b..f1c080f495c53aa6838148c37d20c0d3af743979 100644 (file)
@@ -600,11 +600,7 @@ function statusnet_post_hook(App $a, &$b)
                                logger('Send to GNU Social failed: "' . $result->error . '"');
                        } elseif ($iscomment) {
                                logger('statusnet_post: Update extid ' . $result->id . " for post id " . $b['id']);
-                               q("UPDATE `item` SET `extid` = '%s', `body` = '%s' WHERE `id` = %d",
-                                       dbesc($hostname . "::" . $result->id),
-                                       dbesc($result->text),
-                                       intval($b['id'])
-                               );
+                               Item::update(['extid' => $hostname . "::" . $result->id, 'body' => $result->text], ['id' => $b['id']]);
                        }
                }
                if ($tempfile != "") {