mirror of
https://github.com/friendica/friendica
synced 2025-04-22 11:50:11 +00:00
Merge remote-tracking branch 'upstream/2021.06-rc' into http-input-data
This commit is contained in:
commit
a69e128fe4
18 changed files with 101 additions and 73 deletions
|
@ -41,6 +41,8 @@ class PublicTimeline extends BaseApi
|
|||
*/
|
||||
public static function rawContent(array $parameters = [])
|
||||
{
|
||||
$uid = self::getCurrentUserID();
|
||||
|
||||
$request = self::getRequest([
|
||||
'local' => false, // Show only local statuses? Defaults to false.
|
||||
'remote' => false, // Show only remote statuses? Defaults to false.
|
||||
|
@ -88,7 +90,12 @@ class PublicTimeline extends BaseApi
|
|||
$condition = DBA::mergeConditions($condition, ['gravity' => GRAVITY_PARENT]);
|
||||
}
|
||||
|
||||
$items = Post::selectForUser(0, ['uri-id', 'uid'], $condition, $params);
|
||||
if (!empty($uid)) {
|
||||
$condition = DBA::mergeConditions($condition,
|
||||
["NOT EXISTS (SELECT `cid` FROM `user-contact` WHERE `uid` = ? AND `cid` = `parent-author-id` AND (`blocked` OR `ignored`))", $uid]);
|
||||
}
|
||||
|
||||
$items = Post::selectForUser($uid, ['uri-id', 'uid'], $condition, $params);
|
||||
|
||||
$statuses = [];
|
||||
while ($item = Post::fetch($items)) {
|
||||
|
|
|
@ -43,7 +43,7 @@ class Attach extends BaseModule
|
|||
|
||||
// @TODO: Replace with parameter from router
|
||||
$item_id = intval($a->argv[1]);
|
||||
|
||||
|
||||
// Check for existence
|
||||
$item = MAttach::exists(['id' => $item_id]);
|
||||
if ($item === false) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue