mirror of
https://github.com/friendica/friendica
synced 2025-04-19 13:50:15 +00:00
Don't send the header
This commit is contained in:
parent
a2f386cd2f
commit
5312b23f03
4 changed files with 23 additions and 12 deletions
|
@ -139,13 +139,13 @@ class BaseApi extends BaseModule
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the "link" header with "next" and "prev" links
|
||||
* @return void
|
||||
* Get the "link" header with "next" and "prev" links
|
||||
* @return string
|
||||
*/
|
||||
protected static function setLinkHeader()
|
||||
protected static function getLinkHeader(): string
|
||||
{
|
||||
if (empty(self::$boundaries)) {
|
||||
return;
|
||||
return '';
|
||||
}
|
||||
|
||||
$request = self::$request;
|
||||
|
@ -164,7 +164,19 @@ class BaseApi extends BaseModule
|
|||
$prev = $command . '?' . http_build_query($prev_request);
|
||||
$next = $command . '?' . http_build_query($next_request);
|
||||
|
||||
header('Link: <' . $next . '>; rel="next", <' . $prev . '>; rel="prev"');
|
||||
return 'Link: <' . $next . '>; rel="next", <' . $prev . '>; rel="prev"';
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the "link" header with "next" and "prev" links
|
||||
* @return void
|
||||
*/
|
||||
protected static function setLinkHeader()
|
||||
{
|
||||
$header = self::getLinkHeader();
|
||||
if (!empty($header)) {
|
||||
header($header);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue