Merge pull request #606 from wallabag/fix-556

in RSS feed, add link to wallabag URL #556
This commit is contained in:
Nicolas Lœuillet 2014-04-06 16:40:17 +02:00
commit 292cd0dbd5
2 changed files with 216 additions and 203 deletions

View file

@ -166,6 +166,18 @@
}
/**
* Set the 'source' element of feed item
*
* @access public
* @param string The content of 'source' element
* @return void
*/
public function setSource($link)
{
$this->setElement('source', $link);
}
/**
* Set the 'encloser' element of feed item
* For RSS 2.0 only

View file

@ -1031,6 +1031,7 @@ class Poche
foreach ($entries as $entry) {
$newItem = $feed->createNewItem();
$newItem->setTitle($entry['title']);
$newItem->setSource(Tools::getPocheUrl() . '?view=view&id=' . $entry['id']);
$newItem->setLink($entry['url']);
$newItem->setDate(time());
$newItem->setDescription($entry['content']);