1
0
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:
Bernhard Posselt 2014-10-30 10:25:52 +01:00
parent d03ec062f1
commit 4c390fa6b0
3 changed files with 4 additions and 3 deletions

View File

@ -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);
}

View File

@ -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());
}

View File

@ -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);