[fix] RSS feeds were buggy when I update full-text RSS

This commit is contained in:
Nicolas Lœuillet 2013-12-06 10:14:59 +01:00
parent ac4d114214
commit 9e7c840b18
2 changed files with 5 additions and 10 deletions

View file

@ -101,7 +101,7 @@
*/
public function setDescription($description)
{
$tag = ($this->version == ATOM)? 'summary' : 'description';
$tag = 'description';
$this->setElement($tag, $description);
}
@ -130,12 +130,7 @@
$date = strtotime($date);
}
if($this->version == ATOM)
{
$tag = 'updated';
$value = date(DATE_ATOM, $date);
}
elseif($this->version == RSS2)
if($this->version == RSS2)
{
$tag = 'pubDate';
$value = date(DATE_RSS, $date);

View file

@ -870,10 +870,10 @@ class Poche
}
// Check the token
$feed = new FeedWriter(ATOM);
$feed = new FeedWriter(RSS2);
$feed->setTitle('poche - ' . $type . ' feed');
$feed->setLink(Tools::getPocheUrl());
$feed->setChannelElement('updated', date(DATE_ATOM , time()));
$feed->setChannelElement('updated', date(DATE_RSS , time()));
$feed->setChannelElement('author', 'poche');
$entries = $this->store->getEntriesByView($type, $user_id);