aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-12-06 10:14:59 +0100
committerNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-12-06 10:14:59 +0100
commit9e7c840b186fb4ad2cd3768cec49ee348facf3da (patch)
treeae8c4c5b18eda7f964e1dcde4aaab7b06c84badd
parentac4d114214d820b20e18518a2dbc809337e39043 (diff)
downloadwallabag-9e7c840b186fb4ad2cd3768cec49ee348facf3da.tar.gz
wallabag-9e7c840b186fb4ad2cd3768cec49ee348facf3da.tar.zst
wallabag-9e7c840b186fb4ad2cd3768cec49ee348facf3da.zip
[fix] RSS feeds were buggy when I update full-text RSS
-rw-r--r--inc/3rdparty/libraries/feedwriter/FeedItem.php11
-rw-r--r--inc/poche/Poche.class.php4
2 files changed, 5 insertions, 10 deletions
diff --git a/inc/3rdparty/libraries/feedwriter/FeedItem.php b/inc/3rdparty/libraries/feedwriter/FeedItem.php
index 6761eb0e..9373deeb 100644
--- a/inc/3rdparty/libraries/feedwriter/FeedItem.php
+++ b/inc/3rdparty/libraries/feedwriter/FeedItem.php
@@ -101,7 +101,7 @@
101 */ 101 */
102 public function setDescription($description) 102 public function setDescription($description)
103 { 103 {
104 $tag = ($this->version == ATOM)? 'summary' : 'description'; 104 $tag = 'description';
105 $this->setElement($tag, $description); 105 $this->setElement($tag, $description);
106 } 106 }
107 107
@@ -129,13 +129,8 @@
129 { 129 {
130 $date = strtotime($date); 130 $date = strtotime($date);
131 } 131 }
132 132
133 if($this->version == ATOM) 133 if($this->version == RSS2)
134 {
135 $tag = 'updated';
136 $value = date(DATE_ATOM, $date);
137 }
138 elseif($this->version == RSS2)
139 { 134 {
140 $tag = 'pubDate'; 135 $tag = 'pubDate';
141 $value = date(DATE_RSS, $date); 136 $value = date(DATE_RSS, $date);
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php
index 5862befb..d45d0c40 100644
--- a/inc/poche/Poche.class.php
+++ b/inc/poche/Poche.class.php
@@ -870,10 +870,10 @@ class Poche
870 } 870 }
871 // Check the token 871 // Check the token
872 872
873 $feed = new FeedWriter(ATOM); 873 $feed = new FeedWriter(RSS2);
874 $feed->setTitle('poche - ' . $type . ' feed'); 874 $feed->setTitle('poche - ' . $type . ' feed');
875 $feed->setLink(Tools::getPocheUrl()); 875 $feed->setLink(Tools::getPocheUrl());
876 $feed->setChannelElement('updated', date(DATE_ATOM , time())); 876 $feed->setChannelElement('updated', date(DATE_RSS , time()));
877 $feed->setChannelElement('author', 'poche'); 877 $feed->setChannelElement('author', 'poche');
878 878
879 $entries = $this->store->getEntriesByView($type, $user_id); 879 $entries = $this->store->getEntriesByView($type, $user_id);