mirror of
https://github.com/friendica/friendica
synced 2024-11-11 13:42:54 +00:00
Some more standards
This commit is contained in:
parent
260ee13d07
commit
556bcfe78f
4 changed files with 14 additions and 14 deletions
|
@ -46,9 +46,9 @@ class Favorites extends BaseApi
|
|||
|
||||
// params
|
||||
$since_id = $_REQUEST['since_id'] ?? 0;
|
||||
$max_id = $_REQUEST['max_id'] ?? 0;
|
||||
$count = $_GET['count'] ?? 20;
|
||||
$page = $_REQUEST['page'] ?? 1;
|
||||
$max_id = $_REQUEST['max_id'] ?? 0;
|
||||
$count = $_GET['count'] ?? 20;
|
||||
$page = $_REQUEST['page'] ?? 1;
|
||||
|
||||
$start = max(0, ($page - 1) * $count);
|
||||
|
||||
|
|
|
@ -43,10 +43,10 @@ class HomeTimeline extends BaseApi
|
|||
// get last network messages
|
||||
|
||||
// params
|
||||
$count = $_REQUEST['count'] ?? 20;
|
||||
$page = $_REQUEST['page']?? 0;
|
||||
$count = $_REQUEST['count'] ?? 20;
|
||||
$page = $_REQUEST['page'] ?? 0;
|
||||
$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;
|
||||
|
||||
|
@ -68,7 +68,7 @@ class HomeTimeline 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);
|
||||
|
||||
$include_entities = strtolower(($_REQUEST['include_entities'] ?? 'false') == 'true');
|
||||
|
|
|
@ -39,11 +39,11 @@ class NetworkPublicTimeline extends BaseApi
|
|||
$uid = BaseApi::getCurrentUserID();
|
||||
|
||||
$since_id = $_REQUEST['since_id'] ?? 0;
|
||||
$max_id = $_REQUEST['max_id'] ?? 0;
|
||||
$max_id = $_REQUEST['max_id'] ?? 0;
|
||||
|
||||
// pagination
|
||||
$count = $_REQUEST['count'] ?? 20;
|
||||
$page = $_REQUEST['page'] ?? 1;
|
||||
$page = $_REQUEST['page'] ?? 1;
|
||||
|
||||
$start = max(0, ($page - 1) * $count);
|
||||
|
||||
|
|
|
@ -41,10 +41,10 @@ class PublicTimeline extends BaseApi
|
|||
// get last network messages
|
||||
|
||||
// params
|
||||
$count = $_REQUEST['count'] ?? 20;
|
||||
$page = $_REQUEST['page'] ?? 1;
|
||||
$since_id = $_REQUEST['since_id'] ?? 0;
|
||||
$max_id = $_REQUEST['max_id'] ?? 0;
|
||||
$count = $_REQUEST['count'] ?? 20;
|
||||
$page = $_REQUEST['page'] ?? 1;
|
||||
$since_id = $_REQUEST['since_id'] ?? 0;
|
||||
$max_id = $_REQUEST['max_id'] ?? 0;
|
||||
$exclude_replies = (!empty($_REQUEST['exclude_replies']) ? 1 : 0);
|
||||
$conversation_id = $_REQUEST['conversation_id'] ?? 0;
|
||||
|
||||
|
@ -59,7 +59,7 @@ class PublicTimeline extends BaseApi
|
|||
$condition[] = $max_id;
|
||||
}
|
||||
|
||||
$params = ['order' => ['id' => true], 'limit' => [$start, $count]];
|
||||
$params = ['order' => ['id' => true], 'limit' => [$start, $count]];
|
||||
$statuses = Post::selectForUser($uid, [], $condition, $params);
|
||||
} else {
|
||||
$condition = ["`gravity` IN (?, ?) AND `id` > ? AND `private` = ? AND `wall` AND `origin` AND NOT `author-hidden`",
|
||||
|
|
Loading…
Reference in a new issue