add missing rule

This commit is contained in:
Frédéric FRANCE
2021-03-01 20:37:16 +01:00
parent c5dac4854a
commit a4e25359e7
225 changed files with 1968 additions and 1202 deletions

View File

@@ -410,9 +410,10 @@ class RssParser
}
}
if (!empty($conf->global->EXTERNALRSS_USE_SIMPLEXML)) {
$tmprss = xml2php($rss); $items = $tmprss['entry'];
} // With simplexml
else {
$tmprss = xml2php($rss);
$items = $tmprss['entry'];
} else {
// With simplexml
$items = $rss->items; // With xmlparse
}
//var_dump($items);exit;
@@ -552,45 +553,36 @@ class RssParser
if (isset($attrs['rdf:about'])) {
$this->current_item['about'] = $attrs['rdf:about'];
}
}
// if we're in the default namespace of an RSS feed,
// record textinput or image fields
elseif ($this->_format == 'rss' and
} elseif ($this->_format == 'rss' and
$this->current_namespace == '' and
$el == 'textinput') {
// if we're in the default namespace of an RSS feed,
// record textinput or image fields
$this->intextinput = true;
} elseif ($this->_format == 'rss' and
$this->current_namespace == '' and
$el == 'image') {
$this->inimage = true;
}
// handle atom content constructs
elseif ($this->_format == 'atom' and in_array($el, $this->_CONTENT_CONSTRUCTS)) {
} elseif ($this->_format == 'atom' and in_array($el, $this->_CONTENT_CONSTRUCTS)) {
// handle atom content constructs
// avoid clashing w/ RSS mod_content
if ($el == 'content') {
$el = 'atom_content';
}
$this->incontent = $el;
}
// if inside an Atom content construct (e.g. content or summary) field treat tags as text
elseif ($this->_format == 'atom' and $this->incontent) {
} elseif ($this->_format == 'atom' and $this->incontent) {
// if inside an Atom content construct (e.g. content or summary) field treat tags as text
// if tags are inlined, then flatten
$attrs_str = join(' ', array_map('map_attrs', array_keys($attrs), array_values($attrs)));
$this->append_content("<$element $attrs_str>");
array_unshift($this->stack, $el);
}
// Atom support many links per containging element.
// Magpie treats link elements of type rel='alternate'
// as being equivalent to RSS's simple link element.
//
elseif ($this->_format == 'atom' and $el == 'link') {
} elseif ($this->_format == 'atom' and $el == 'link') {
// Atom support many links per containging element.
// Magpie treats link elements of type rel='alternate'
// as being equivalent to RSS's simple link element.
if (isset($attrs['rel']) && $attrs['rel'] == 'alternate') {
$link_el = 'link';
} elseif (!isset($attrs['rel'])) {
@@ -600,9 +592,8 @@ class RssParser
}
$this->append($link_el, $attrs['href']);
}
// set stack[0] to current element
else {
} else {
// set stack[0] to current element
array_unshift($this->stack, $el);
}
}