From: Michael Date: Sat, 23 Jun 2018 10:51:45 +0000 (+0000) Subject: Pumpio: Fix for wrong item class function call X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f8916bf9d9a5e777f613d44ff1f2ca0301798356;p=friendica-addons.git Pumpio: Fix for wrong item class function call --- diff --git a/pumpio/pumpio.php b/pumpio/pumpio.php index f5eb47b7..bc5dda5e 100644 --- a/pumpio/pumpio.php +++ b/pumpio/pumpio.php @@ -570,7 +570,7 @@ function pumpio_action(&$a, $uid, $uri, $action, $content = "") { $hostname = PConfig::get($uid, 'pumpio','host'); $username = PConfig::get($uid, "pumpio", "user"); - $orig_post = Item::select([], ['uri' => $uri, 'uid' => $uid]); + $orig_post = Item::selectFirst([], ['uri' => $uri, 'uid' => $uid]); if (!DBM::is_result($orig_post)) { return; @@ -822,9 +822,9 @@ function pumpio_fetchtimeline(&$a, $uid) { function pumpio_dounlike(&$a, $uid, $self, $post, $own_id) { // Searching for the unliked post // Two queries for speed issues - $orig_post = Item::select([], ['uri' => $post->object->id, 'uid' => $uid]); + $orig_post = Item::selectFirst([], ['uri' => $post->object->id, 'uid' => $uid]); if (!DBM::is_result($r)) { - $orig_post = Item::select([], ['extid' => $post->object->id, 'uid' => $uid]); + $orig_post = Item::selectFirst([], ['extid' => $post->object->id, 'uid' => $uid]); if (!DBM::is_result($r)) { return; } @@ -865,9 +865,9 @@ function pumpio_dolike(&$a, $uid, $self, $post, $own_id, $threadcompletion = tru // Searching for the liked post // Two queries for speed issues - $orig_post = Item::select([], ['uri' => $post->object->id, 'uid' => $uid]); + $orig_post = Item::selectFirst([], ['uri' => $post->object->id, 'uid' => $uid]); if (!DBM::is_result($r)) { - $orig_post = Item::select([], ['extid' => $post->object->id, 'uid' => $uid]); + $orig_post = Item::selectFirst([], ['extid' => $post->object->id, 'uid' => $uid]); if (!DBM::is_result($r)) { return; }