mirror of
https://github.com/friendica/friendica
synced 2024-11-18 11:43:41 +00:00
Symplified code
This commit is contained in:
parent
a183723254
commit
b402a760a8
1 changed files with 4 additions and 5 deletions
|
@ -3690,13 +3690,12 @@ class Item
|
||||||
}
|
}
|
||||||
|
|
||||||
$shared_item = Post::selectFirst(['uri-id'], ['id' => $id]);
|
$shared_item = Post::selectFirst(['uri-id'], ['id' => $id]);
|
||||||
if (!DBA::isResult($shared_item)) {
|
if (!empty($shared_item['uri-id'])) {
|
||||||
Logger::warning('Post does not exist.', ['id' => $id, 'url' => $url, 'uid' => $uid]);
|
|
||||||
return 0;
|
|
||||||
} else {
|
|
||||||
Logger::debug('Fetched shared post', ['id' => $id, 'url' => $url, 'uid' => $uid]);
|
Logger::debug('Fetched shared post', ['id' => $id, 'url' => $url, 'uid' => $uid]);
|
||||||
|
return $shared_item['uri-id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
return $shared_item['uri-id'];
|
Logger::warning('Post does not exist although it was supposed to had been fetched.', ['id' => $id, 'url' => $url, 'uid' => $uid]);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue