mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-15 18:57:05 +00:00
Merge branch 'dev' of https://github.com/wallabag/wallabag into epub
This commit is contained in:
commit
6a3c510157
11 changed files with 453 additions and 240 deletions
|
@ -174,7 +174,8 @@
|
|||
*/
|
||||
public function setSource($link)
|
||||
{
|
||||
$this->setElement('source', $link);
|
||||
$attributes = array('url'=>$link);
|
||||
$this->setElement('source', "wallabag",$attributes);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
23
inc/3rdparty/libraries/feedwriter/FeedWriter.php
vendored
23
inc/3rdparty/libraries/feedwriter/FeedWriter.php
vendored
|
@ -87,12 +87,25 @@ define('JSONP', 3, true);
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function genarateFeed()
|
||||
public function genarateFeed($withHeaders = true)
|
||||
{
|
||||
header('Content-type: text/xml; charset=UTF-8');
|
||||
// this line prevents Chrome 20 from prompting download
|
||||
// used by Google: https://news.google.com/news/feeds?ned=us&topic=b&output=rss
|
||||
header('X-content-type-options: nosniff');
|
||||
if ($withHeaders) {
|
||||
if ($this->version == RSS2) {
|
||||
header('Content-type: text/xml; charset=UTF-8');
|
||||
// this line prevents Chrome 20 from prompting download
|
||||
// used by Google: https://news.google.com/news/feeds?ned=us&topic=b&output=rss
|
||||
header('X-content-type-options: nosniff');
|
||||
} elseif ($this->version == JSON) {
|
||||
header('Content-type: application/json; charset=UTF-8');
|
||||
} elseif ($this->version == JSONP) {
|
||||
header('Content-type: application/javascript; charset=UTF-8');
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->version == JSON || $this->version == JSONP) {
|
||||
$this->json = new stdClass();
|
||||
}
|
||||
|
||||
|
||||
$this->printHead();
|
||||
$this->printChannels();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue