зеркало из https://github.com/nextcloud/news.git
Fix lastModified to be a string rather than an integer. (#355)
This fixes https://github.com/nextcloud/news/issues/350#issue-369283392 Signed-off-by: Detlev Zundel <dzu@member.fsf.org>
This commit is contained in:
Родитель
341b705ca8
Коммит
8337d2aa7d
|
@ -46,8 +46,8 @@ class Feed extends Entity implements IAPI, \JsonSerializable
|
|||
protected $articlesPerUpdate = 0;
|
||||
/** @var string|null */
|
||||
protected $httpLastModified = null;
|
||||
/** @var int|null */
|
||||
protected $lastModified = 0;
|
||||
/** @var string|null */
|
||||
protected $lastModified = '0';
|
||||
/** @var string|null */
|
||||
protected $httpEtag = null;
|
||||
/** @var string|null */
|
||||
|
@ -158,7 +158,7 @@ class Feed extends Entity implements IAPI, \JsonSerializable
|
|||
}
|
||||
|
||||
/**
|
||||
* @return int|null
|
||||
* @return string|null
|
||||
*/
|
||||
public function getLastModified()
|
||||
{
|
||||
|
@ -433,9 +433,9 @@ class Feed extends Entity implements IAPI, \JsonSerializable
|
|||
}
|
||||
|
||||
/**
|
||||
* @param int|null $lastModified
|
||||
* @param string|null $lastModified
|
||||
*/
|
||||
public function setLastModified(int $lastModified = null)
|
||||
public function setLastModified(string $lastModified = null)
|
||||
{
|
||||
if ($this->lastModified !== $lastModified) {
|
||||
$this->lastModified = $lastModified;
|
||||
|
|
|
@ -30,8 +30,8 @@ class Folder extends Entity implements IAPI, \JsonSerializable
|
|||
protected $opened = true;
|
||||
/** @var int|null */
|
||||
protected $deletedAt = 0;
|
||||
/** @var int|null */
|
||||
protected $lastModified = 0;
|
||||
/** @var string|null */
|
||||
protected $lastModified = '0';
|
||||
|
||||
/**
|
||||
* @return int|null
|
||||
|
@ -47,7 +47,7 @@ class Folder extends Entity implements IAPI, \JsonSerializable
|
|||
}
|
||||
|
||||
/**
|
||||
* @return int|null
|
||||
* @return string|null
|
||||
*/
|
||||
public function getLastModified()
|
||||
{
|
||||
|
@ -110,7 +110,7 @@ class Folder extends Entity implements IAPI, \JsonSerializable
|
|||
}
|
||||
}
|
||||
|
||||
public function setLastModified(int $lastModified = null)
|
||||
public function setLastModified(string $lastModified = null)
|
||||
{
|
||||
|
||||
if ($this->lastModified !== $lastModified) {
|
||||
|
|
|
@ -46,8 +46,8 @@ class Item extends Entity implements IAPI, \JsonSerializable
|
|||
protected $feedId;
|
||||
/** @var int */
|
||||
protected $status = 0;
|
||||
/** @var int|null */
|
||||
protected $lastModified = 0;
|
||||
/** @var string|null */
|
||||
protected $lastModified = '0';
|
||||
/** @var string|null */
|
||||
protected $searchIndex;
|
||||
/** @var bool */
|
||||
|
@ -181,7 +181,7 @@ class Item extends Entity implements IAPI, \JsonSerializable
|
|||
}
|
||||
|
||||
/**
|
||||
* @return int|null
|
||||
* @return string|null
|
||||
*/
|
||||
public function getLastModified()
|
||||
{
|
||||
|
@ -356,7 +356,7 @@ class Item extends Entity implements IAPI, \JsonSerializable
|
|||
}
|
||||
}
|
||||
|
||||
public function setLastModified(int $lastModified = null)
|
||||
public function setLastModified(string $lastModified = null)
|
||||
{
|
||||
if ($this->lastModified !== $lastModified) {
|
||||
$this->lastModified = $lastModified;
|
||||
|
|
Загрузка…
Ссылка в новой задаче