Remove PHP notice
This commit is contained in:
parent
9c8b19ff68
commit
a305cbc4f6
@ -574,8 +574,7 @@ function save_config(array $values)
|
|||||||
\PicoTools\Translator\load($values['language']);
|
\PicoTools\Translator\load($values['language']);
|
||||||
|
|
||||||
// If the user does not want content of feeds, remove it in previous ones
|
// If the user does not want content of feeds, remove it in previous ones
|
||||||
if ((bool) $values['nocontent']) {
|
if (isset($values['nocontent']) && (bool) $values['nocontent']) {
|
||||||
|
|
||||||
\PicoTools\singleton('db')->table('items')->update(array('content' => ''));
|
\PicoTools\singleton('db')->table('items')->update(array('content' => ''));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
vendor/PicoFeed/Writers/Atom.php
vendored
2
vendor/PicoFeed/Writers/Atom.php
vendored
@ -31,7 +31,7 @@ class Atom extends \PicoFeed\Writer
|
|||||||
|
|
||||||
// <generator/>
|
// <generator/>
|
||||||
$generator = $this->dom->createElement('generator', 'PicoFeed');
|
$generator = $this->dom->createElement('generator', 'PicoFeed');
|
||||||
$generator->setAttribute('url', 'https://github.com/fguillot/picoFeed');
|
$generator->setAttribute('uri', 'https://github.com/fguillot/picoFeed');
|
||||||
$feed->appendChild($generator);
|
$feed->appendChild($generator);
|
||||||
|
|
||||||
// <title/>
|
// <title/>
|
||||||
|
11
vendor/PicoFeed/Writers/Rss20.php
vendored
11
vendor/PicoFeed/Writers/Rss20.php
vendored
@ -9,6 +9,7 @@ class Rss20 extends \PicoFeed\Writer
|
|||||||
private $required_feed_properties = array(
|
private $required_feed_properties = array(
|
||||||
'title',
|
'title',
|
||||||
'site_url',
|
'site_url',
|
||||||
|
'feed_url',
|
||||||
);
|
);
|
||||||
|
|
||||||
private $required_item_properties = array(
|
private $required_item_properties = array(
|
||||||
@ -28,6 +29,7 @@ class Rss20 extends \PicoFeed\Writer
|
|||||||
$rss = $this->dom->createElement('rss');
|
$rss = $this->dom->createElement('rss');
|
||||||
$rss->setAttribute('version', '2.0');
|
$rss->setAttribute('version', '2.0');
|
||||||
$rss->setAttributeNodeNS(new \DomAttr('xmlns:content', 'http://purl.org/rss/1.0/modules/content/'));
|
$rss->setAttributeNodeNS(new \DomAttr('xmlns:content', 'http://purl.org/rss/1.0/modules/content/'));
|
||||||
|
$rss->setAttributeNodeNS(new \DomAttr('xmlns:atom', 'http://www.w3.org/2005/Atom'));
|
||||||
|
|
||||||
$channel = $this->dom->createElement('channel');
|
$channel = $this->dom->createElement('channel');
|
||||||
|
|
||||||
@ -44,6 +46,13 @@ class Rss20 extends \PicoFeed\Writer
|
|||||||
// <pubDate/>
|
// <pubDate/>
|
||||||
$this->addPubDate($channel, isset($this->updated) ? $this->updated : '');
|
$this->addPubDate($channel, isset($this->updated) ? $this->updated : '');
|
||||||
|
|
||||||
|
// <atom:link/>
|
||||||
|
$link = $this->dom->createElement('atom:link');
|
||||||
|
$link->setAttribute('href', $this->feed_url);
|
||||||
|
$link->setAttribute('rel', 'self');
|
||||||
|
$link->setAttribute('type', 'application/rss+xml');
|
||||||
|
$channel->appendChild($link);
|
||||||
|
|
||||||
// <link/>
|
// <link/>
|
||||||
$channel->appendChild($this->dom->createElement('link', $this->site_url));
|
$channel->appendChild($this->dom->createElement('link', $this->site_url));
|
||||||
|
|
||||||
@ -55,7 +64,7 @@ class Rss20 extends \PicoFeed\Writer
|
|||||||
|
|
||||||
$this->checkRequiredProperties($this->required_item_properties, $item);
|
$this->checkRequiredProperties($this->required_item_properties, $item);
|
||||||
|
|
||||||
$entry = $this->dom->createElement('entry');
|
$entry = $this->dom->createElement('item');
|
||||||
|
|
||||||
// <title/>
|
// <title/>
|
||||||
$entry->appendChild($this->dom->createElement('title', $item['title']));
|
$entry->appendChild($this->dom->createElement('title', $item['title']));
|
||||||
|
Loading…
Reference in New Issue
Block a user