mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 19:05:55 +00:00
simplify media:content xpath
This commit is contained in:
@@ -112,19 +112,7 @@ class FeedItem_RSS extends FeedItem_Common {
|
||||
array_push($encs, $enc);
|
||||
}
|
||||
|
||||
$enclosures = $this->xpath->query("media:content", $this->elem);
|
||||
|
||||
foreach ($enclosures as $enclosure) {
|
||||
$enc = new FeedEnclosure();
|
||||
|
||||
$enc->type = $enclosure->getAttribute("type");
|
||||
$enc->link = $enclosure->getAttribute("url");
|
||||
$enc->length = $enclosure->getAttribute("length");
|
||||
|
||||
array_push($encs, $enc);
|
||||
}
|
||||
|
||||
$enclosures = $this->xpath->query("media:group/media:content", $this->elem);
|
||||
$enclosures = $this->xpath->query("media:content | media:group/media:content", $this->elem);
|
||||
|
||||
foreach ($enclosures as $enclosure) {
|
||||
$enc = new FeedEnclosure();
|
||||
|
||||
Reference in New Issue
Block a user