diff options
author | Daniel Schaal <daniel@schaal.email> | 2016-10-01 08:34:40 +0200 |
---|---|---|
committer | Bernhard Posselt <BernhardPosselt@users.noreply.github.com> | 2016-10-01 08:34:40 +0200 |
commit | e45511f6ba5a53a137538e4647148aa749009233 (patch) | |
tree | c4f1265f1129556f09d6fb2b110325e9958f2d99 /lib/Db | |
parent | f46ed33ea553bc45cff973150f69227da13baace (diff) |
Add updatedDate to item model (#43)
* Update picoFeed to 0.1.25
* Add updated_date to database
* Add updatedDate to item model
* Bump version to 9.0.5
* Check for updatedDate when updating a feed
* Fix unit test to check for newer updatedDate
Diffstat (limited to 'lib/Db')
-rw-r--r-- | lib/Db/Item.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Db/Item.php b/lib/Db/Item.php index 943002c32..f19843c8e 100644 --- a/lib/Db/Item.php +++ b/lib/Db/Item.php @@ -57,6 +57,7 @@ class Item extends Entity implements IAPI, \JsonSerializable { protected $title; protected $author; protected $pubDate; + protected $updatedDate; protected $body; protected $enclosureMime; protected $enclosureLink; @@ -69,6 +70,7 @@ class Item extends Entity implements IAPI, \JsonSerializable { public function __construct() { $this->addType('pubDate', 'integer'); + $this->addType('updatedDate', 'integer'); $this->addType('feedId', 'integer'); $this->addType('status', 'integer'); $this->addType('rtl', 'boolean'); @@ -122,6 +124,7 @@ class Item extends Entity implements IAPI, \JsonSerializable { 'title' => $this->getTitle(), 'author' => $this->getAuthor(), 'pubDate' => $this->getPubDate(), + 'updatedDate' => $this->getUpdatedDate(), 'body' => $this->getBody(), 'enclosureMime' => $this->getEnclosureMime(), 'enclosureLink' => $this->getEnclosureLink(), @@ -144,6 +147,7 @@ class Item extends Entity implements IAPI, \JsonSerializable { 'title' => $this->getTitle(), 'author' => $this->getAuthor(), 'pubDate' => $this->getPubDate(), + 'updatedDate' => $this->getUpdatedDate(), 'body' => $this->getBody(), 'enclosureMime' => $this->getEnclosureMime(), 'enclosureLink' => $this->getEnclosureLink(), @@ -164,6 +168,7 @@ class Item extends Entity implements IAPI, \JsonSerializable { 'title' => $this->getTitle(), 'author' => $this->getAuthor(), 'pubDate' => $this->getPubDate(), + 'updatedDate' => $this->getUpdatedDate(), 'body' => $this->getBody(), 'enclosureMime' => $this->getEnclosureMime(), 'enclosureLink' => $this->getEnclosureLink(), @@ -186,6 +191,7 @@ 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']); |