mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
add missing rule
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user