mirror of
https://github.com/chylex/Nextcloud-News.git
synced 2025-04-09 10:15:44 +02:00
dont generate guid hash by hashing the guid since picofeed already hashes the guid in all cases
This commit is contained in:
parent
d03ec062f1
commit
4c390fa6b0
@ -204,7 +204,9 @@ class Item extends Entity implements IAPI, \JsonSerializable {
|
||||
|
||||
public function setGuid($guid) {
|
||||
parent::setGuid($guid);
|
||||
$this->setGuidHash(md5($guid));
|
||||
|
||||
// not needed to hash again because picofeed hashes the id anyways
|
||||
$this->setGuidHash($guid);
|
||||
}
|
||||
|
||||
|
||||
|
@ -263,7 +263,7 @@ class ItemTest extends \PHPUnit_Framework_TestCase {
|
||||
public function testSetGuidUpdatesHash() {
|
||||
$item = new Item();
|
||||
$item->setGuid('http://test');
|
||||
$this->assertEquals(md5('http://test'), $item->getGuidHash());
|
||||
$this->assertEquals('http://test', $item->getGuidHash());
|
||||
}
|
||||
|
||||
|
||||
|
@ -192,7 +192,6 @@ class FeedFetcherTest extends \PHPUnit_Framework_TestCase {
|
||||
$item->setUrl($this->permalink);
|
||||
$item->setTitle('my<\' title');
|
||||
$item->setGuid($this->guid);
|
||||
$item->setGuidHash(md5($this->guid));
|
||||
$item->setBody($this->body);
|
||||
$item->setLastModified($this->time);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user