]> git.mxchange.org Git - friendica-addons.git/blobdiff - statusnet/statusnet.php
Merge pull request #539 from MrPetovan/bug/4555-remove-active-users-feature
[friendica-addons.git] / statusnet / statusnet.php
index 22e8f5f9c28256032b5283fc464010951b85623b..c54ff55f6c923ce65d4b4e3051bf2d770144884c 100644 (file)
@@ -544,7 +544,6 @@ function statusnet_post_hook(App $a, &$b)
                        return;
                }
 
-               require_once 'include/bbcode.php';
                $dent = new StatusNetOAuth($api, $ckey, $csecret, $otoken, $osecret);
                $max_char = $dent->get_maxlength(); // max. length for a dent
 
@@ -600,11 +599,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 != "") {