diff options
author | tcit <tcit@tcit.fr> | 2014-05-14 19:17:51 +0200 |
---|---|---|
committer | tcit <tcit@tcit.fr> | 2014-05-14 19:17:51 +0200 |
commit | 6a3c5101577d08d65c22706dea61bba23cca782b (patch) | |
tree | 61454bcb0d3f059963d5eef255cc9d79e736d4f0 /inc/3rdparty/libraries | |
parent | 34acb02cbbc700f0d73ac340e906d3179932ab2b (diff) | |
parent | 818b186f8aa3f46d7cbddaeca94bd9cec57c213e (diff) | |
download | wallabag-6a3c5101577d08d65c22706dea61bba23cca782b.tar.gz wallabag-6a3c5101577d08d65c22706dea61bba23cca782b.tar.zst wallabag-6a3c5101577d08d65c22706dea61bba23cca782b.zip |
Merge branch 'dev' of https://github.com/wallabag/wallabag into epub
Diffstat (limited to 'inc/3rdparty/libraries')
-rw-r--r-- | inc/3rdparty/libraries/feedwriter/FeedItem.php | 3 | ||||
-rwxr-xr-x | inc/3rdparty/libraries/feedwriter/FeedWriter.php | 23 |
2 files changed, 20 insertions, 6 deletions
diff --git a/inc/3rdparty/libraries/feedwriter/FeedItem.php b/inc/3rdparty/libraries/feedwriter/FeedItem.php index 3487423f..54a56f22 100644 --- a/inc/3rdparty/libraries/feedwriter/FeedItem.php +++ b/inc/3rdparty/libraries/feedwriter/FeedItem.php | |||
@@ -174,7 +174,8 @@ | |||
174 | */ | 174 | */ |
175 | public function setSource($link) | 175 | public function setSource($link) |
176 | { | 176 | { |
177 | $this->setElement('source', $link); | 177 | $attributes = array('url'=>$link); |
178 | $this->setElement('source', "wallabag",$attributes); | ||
178 | } | 179 | } |
179 | 180 | ||
180 | /** | 181 | /** |
diff --git a/inc/3rdparty/libraries/feedwriter/FeedWriter.php b/inc/3rdparty/libraries/feedwriter/FeedWriter.php index 79639c0c..d708e99b 100755 --- a/inc/3rdparty/libraries/feedwriter/FeedWriter.php +++ b/inc/3rdparty/libraries/feedwriter/FeedWriter.php | |||
@@ -87,12 +87,25 @@ define('JSONP', 3, true); | |||
87 | * @access public | 87 | * @access public |
88 | * @return void | 88 | * @return void |
89 | */ | 89 | */ |
90 | public function genarateFeed() | 90 | public function genarateFeed($withHeaders = true) |
91 | { | 91 | { |
92 | header('Content-type: text/xml; charset=UTF-8'); | 92 | if ($withHeaders) { |
93 | // this line prevents Chrome 20 from prompting download | 93 | if ($this->version == RSS2) { |
94 | // used by Google: https://news.google.com/news/feeds?ned=us&topic=b&output=rss | 94 | header('Content-type: text/xml; charset=UTF-8'); |
95 | header('X-content-type-options: nosniff'); | 95 | // this line prevents Chrome 20 from prompting download |
96 | // used by Google: https://news.google.com/news/feeds?ned=us&topic=b&output=rss | ||
97 | header('X-content-type-options: nosniff'); | ||
98 | } elseif ($this->version == JSON) { | ||
99 | header('Content-type: application/json; charset=UTF-8'); | ||
100 | } elseif ($this->version == JSONP) { | ||
101 | header('Content-type: application/javascript; charset=UTF-8'); | ||
102 | } | ||
103 | } | ||
104 | |||
105 | if ($this->version == JSON || $this->version == JSONP) { | ||
106 | $this->json = new stdClass(); | ||
107 | } | ||
108 | |||
96 | 109 | ||
97 | $this->printHead(); | 110 | $this->printHead(); |
98 | $this->printChannels(); | 111 | $this->printChannels(); |