diff options
Diffstat (limited to 'classes/feeditem')
-rw-r--r-- | classes/feeditem/atom.php | 5 | ||||
-rw-r--r-- | classes/feeditem/rss.php | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/classes/feeditem/atom.php b/classes/feeditem/atom.php index 8a21d6142..b7a228aed 100644 --- a/classes/feeditem/atom.php +++ b/classes/feeditem/atom.php @@ -137,7 +137,7 @@ class FeedItem_Atom extends FeedItem_Common { } } - $enclosures = $this->xpath->query("media:content", $this->elem); + $enclosures = $this->xpath->query("media:content | media:group/media:content", $this->elem); foreach ($enclosures as $enclosure) { $enc = new FeedEnclosure(); @@ -146,6 +146,9 @@ class FeedItem_Atom extends FeedItem_Common { $enc->link = $enclosure->getAttribute("url"); $enc->length = $enclosure->getAttribute("length"); + $desc = $this->xpath->query("media:description", $enclosure)->item(0); + if ($desc) $enc->title = strip_tags($desc->nodeValue); + array_push($encs, $enc); } diff --git a/classes/feeditem/rss.php b/classes/feeditem/rss.php index e5960243c..1f59f0612 100644 --- a/classes/feeditem/rss.php +++ b/classes/feeditem/rss.php @@ -112,7 +112,7 @@ class FeedItem_RSS extends FeedItem_Common { array_push($encs, $enc); } - $enclosures = $this->xpath->query("media:content", $this->elem); + $enclosures = $this->xpath->query("media:content | media:group/media:content", $this->elem); foreach ($enclosures as $enclosure) { $enc = new FeedEnclosure(); @@ -121,6 +121,9 @@ class FeedItem_RSS extends FeedItem_Common { $enc->link = $enclosure->getAttribute("url"); $enc->length = $enclosure->getAttribute("length"); + $desc = $this->xpath->query("media:description", $enclosure)->item(0); + if ($desc) $enc->title = strip_tags($desc->nodeValue); + array_push($encs, $enc); } |