diff options
Diffstat (limited to 'lib/Db/Item.php')
-rw-r--r-- | lib/Db/Item.php | 38 |
1 files changed, 10 insertions, 28 deletions
diff --git a/lib/Db/Item.php b/lib/Db/Item.php index cb10900d4..abfcf6506 100644 --- a/lib/Db/Item.php +++ b/lib/Db/Item.php @@ -39,8 +39,6 @@ class Item extends Entity implements IAPI, \JsonSerializable protected $author; /** @var int|null */ protected $pubDate; - /** @var int|null */ - protected $updatedDate; /** @var string|null */ protected $body; /** @var string|null */ @@ -53,8 +51,6 @@ class Item extends Entity implements IAPI, \JsonSerializable protected $mediaDescription; /** @var int */ protected $feedId; - /** @var int */ - protected $status = 0; /** @var string|null */ protected $lastModified = '0'; /** @var string|null */ @@ -77,14 +73,12 @@ class Item extends Entity implements IAPI, \JsonSerializable $this->addType('title', 'string'); $this->addType('author', 'string'); $this->addType('pubDate', 'integer'); - $this->addType('updatedDate', 'integer'); $this->addType('body', 'string'); $this->addType('enclosureMime', 'string'); $this->addType('enclosureLink', 'string'); $this->addType('mediaThumbnail', 'string'); $this->addType('mediaDescription', 'string'); $this->addType('feedId', 'integer'); - $this->addType('status', 'integer'); $this->addType('lastModified', 'string'); $this->addType('searchIndex', 'string'); $this->addType('rtl', 'boolean'); @@ -115,7 +109,6 @@ class Item extends Entity implements IAPI, \JsonSerializable $item->setTitle($import['title']); $item->setAuthor($import['author']); $item->setPubDate($import['pubDate']); - $item->setUpdatedDate($import['updatedDate']); $item->setBody($import['body']); $item->setEnclosureMime($import['enclosureMime']); $item->setEnclosureLink($import['enclosureLink']); @@ -265,14 +258,6 @@ class Item extends Entity implements IAPI, \JsonSerializable } /** - * @return int|null - */ - public function getUpdatedDate(): ?int - { - return $this->updatedDate; - } - - /** * @return null|string */ public function getUrl(): ?string @@ -303,7 +288,7 @@ class Item extends Entity implements IAPI, \JsonSerializable 'title' => $this->getTitle(), 'author' => $this->getAuthor(), 'pubDate' => $this->getPubDate(), - 'updatedDate' => $this->getUpdatedDate(), + 'updatedDate' => null, 'body' => $this->getBody(), 'enclosureMime' => $this->getEnclosureMime(), 'enclosureLink' => $this->getEnclosureLink(), @@ -507,16 +492,6 @@ class Item extends Entity implements IAPI, \JsonSerializable return $this; } - public function setUpdatedDate(int $updatedDate = null): self - { - if ($this->updatedDate !== $updatedDate) { - $this->updatedDate = $updatedDate; - $this->markFieldUpdated('updatedDate'); - } - - return $this; - } - public function setUrl(string $url = null): self { $url = trim($url); @@ -540,7 +515,7 @@ class Item extends Entity implements IAPI, \JsonSerializable 'title' => $this->getTitle(), 'author' => $this->getAuthor(), 'pubDate' => $this->getPubDate(), - 'updatedDate' => $this->getUpdatedDate(), + 'updatedDate' => null, 'body' => $this->getBody(), 'enclosureMime' => $this->getEnclosureMime(), 'enclosureLink' => $this->getEnclosureLink(), @@ -556,6 +531,13 @@ class Item extends Entity implements IAPI, \JsonSerializable ]; } + /** + * Format for exporting. + * + * @param $feeds + * + * @return array + */ public function toExport($feeds): array { return [ @@ -564,7 +546,7 @@ class Item extends Entity implements IAPI, \JsonSerializable 'title' => $this->getTitle(), 'author' => $this->getAuthor(), 'pubDate' => $this->getPubDate(), - 'updatedDate' => $this->getUpdatedDate(), + 'updatedDate' => null, 'body' => $this->getBody(), 'enclosureMime' => $this->getEnclosureMime(), 'enclosureLink' => $this->getEnclosureLink(), |