forked from GNUsocial/gnu-social
Disable deprecated 'since' parameter on public_timeline API; causes performance problems. (since_id will work cleanly)
This commit is contained in:
parent
96ef4435b6
commit
bc4e843f39
@ -75,6 +75,10 @@ class ApiTimelinePublicAction extends ApiPrivateAuthAction
|
||||
|
||||
$this->notices = $this->getNotices();
|
||||
|
||||
if ($this->since) {
|
||||
throw new ServerException("since parameter is disabled for performance; use since_id", 403);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -145,7 +149,7 @@ class ApiTimelinePublicAction extends ApiPrivateAuthAction
|
||||
|
||||
$notice = Notice::publicStream(
|
||||
($this->page - 1) * $this->count, $this->count, $this->since_id,
|
||||
$this->max_id, $this->since
|
||||
$this->max_id
|
||||
);
|
||||
|
||||
while ($notice->fetch()) {
|
||||
|
Loading…
Reference in New Issue
Block a user