Standards ...

This commit is contained in:
Michael 2021-11-24 23:35:01 +00:00
parent 299d70ca1d
commit 6d1d4789f1
4 changed files with 9 additions and 9 deletions

View File

@ -73,7 +73,7 @@ class HomeTimeline extends BaseApi
$include_entities = strtolower(($_REQUEST['include_entities'] ?? 'false') == 'true');
$ret = [];
$ret = [];
$idarray = [];
while ($status = DBA::fetch($statuses)) {
$ret[] = DI::twitterStatus()->createFromUriId($status['uri-id'], $status['uid'], $include_entities)->toArray();

View File

@ -55,7 +55,7 @@ class NetworkPublicTimeline extends BaseApi
$condition[] = $max_id;
}
$params = ['order' => ['id' => true], 'limit' => [$start, $count]];
$params = ['order' => ['id' => true], 'limit' => [$start, $count]];
$statuses = Post::selectForUser($uid, Item::DISPLAY_FIELDLIST, $condition, $params);
$include_entities = strtolower(($_REQUEST['include_entities'] ?? 'false') == 'true');

View File

@ -41,10 +41,10 @@ class PublicTimeline extends BaseApi
// get last network messages
// params
$count = $_REQUEST['count'] ?? 20;
$page = $_REQUEST['page'] ?? 1;
$count = $_REQUEST['count'] ?? 20;
$page = $_REQUEST['page'] ?? 1;
$since_id = $_REQUEST['since_id'] ?? 0;
$max_id = $_REQUEST['max_id'] ?? 0;
$max_id = $_REQUEST['max_id'] ?? 0;
$exclude_replies = (!empty($_REQUEST['exclude_replies']) ? 1 : 0);
$conversation_id = $_REQUEST['conversation_id'] ?? 0;
@ -74,7 +74,7 @@ class PublicTimeline extends BaseApi
$condition[] = $conversation_id;
}
$params = ['order' => ['id' => true], 'limit' => [$start, $count]];
$params = ['order' => ['id' => true], 'limit' => [$start, $count]];
$statuses = Post::selectForUser($uid, [], $condition, $params);
}

View File

@ -44,13 +44,13 @@ class UserTimeline extends BaseApi
$cid = BaseApi::getContactIDForSearchterm($_REQUEST['screen_name'] ?? '', $_REQUEST['user_id'] ?? 0, $uid);
$since_id = $_REQUEST['since_id'] ?? 0;
$max_id = $_REQUEST['max_id'] ?? 0;
$max_id = $_REQUEST['max_id'] ?? 0;
$exclude_replies = !empty($_REQUEST['exclude_replies']);
$conversation_id = $_REQUEST['conversation_id'] ?? 0;
// pagination
$count = $_REQUEST['count'] ?? 20;
$page = $_REQUEST['page'] ?? 1;
$page = $_REQUEST['page'] ?? 1;
$start = max(0, ($page - 1) * $count);
@ -71,7 +71,7 @@ class UserTimeline extends BaseApi
$condition[0] .= " AND `id` <= ?";
$condition[] = $max_id;
}
$params = ['order' => ['id' => true], 'limit' => [$start, $count]];
$params = ['order' => ['id' => true], 'limit' => [$start, $count]];
$statuses = Post::selectForUser($uid, [], $condition, $params);
$include_entities = strtolower(($_REQUEST['include_entities'] ?? 'false') == 'true');