$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;
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;
}
// 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;
}