diff options
Diffstat (limited to 'db/item.php')
-rw-r--r-- | db/item.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/db/item.php b/db/item.php index c66b68a33..91b3215a6 100644 --- a/db/item.php +++ b/db/item.php @@ -61,6 +61,7 @@ class Item extends Entity implements IAPI, \JsonSerializable { protected $lastModified; protected $searchIndex; protected $rtl; + protected $fingerprint; public function __construct(){ $this->addType('pubDate', 'integer'); @@ -214,6 +215,11 @@ class Item extends Entity implements IAPI, \JsonSerializable { $this->getUrl() ) ); + $this->setFingerprint($this->computeFingerprint()); + } + + private function computeFingerprint() { + return md5($this->getTitle() . $this->getUrl() . $this->getBody()); } public function setUrl($url) { |