summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2008-10-25 03:03:37 +0100
committerAndrew Dolgov <[email protected]>2008-10-25 03:03:37 +0100
commitb652fdae2926e6e267bfb8744470a03558d38a4a (patch)
tree75b37027142715370bcac62cbcafd133c0ff015c /functions.php
parenta3eeb47167559eae03cd9d155a9ff85400094e80 (diff)
properly import multiple media-tag enclosures in feeds (magpie)
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/functions.php b/functions.php
index f9c78bee3..f32d85af9 100644
--- a/functions.php
+++ b/functions.php
@@ -1033,7 +1033,7 @@
}
// <media:content>
- // can there be many of those? -fox
+ // can there be many of those? yes -fox
$m_ctr = $item['media']['content#'];
@@ -1043,9 +1043,18 @@
$item['media']['content@length']);
array_push($enclosures, $e_item);
- }
- // FIXME: parse more of those, if needed.
+ for ($i = 0; $i <= $m_ctr; $i++ ) {
+
+ if ($item["media"]["content#$i@url"]) {
+ $e_item = array($item["media"]["content#$i@url"],
+ $item["media"]["content#$i@medium"],
+ $item["media"]["content#$i@length"]);
+ array_push($enclosures, $e_item);
+ }
+ }
+
+ }
}
# sanitize content