summaryrefslogtreecommitdiff
path: root/classes/feeditem
diff options
context:
space:
mode:
authorFelix Eckhofer <[email protected]>2014-07-15 15:32:28 +0200
committerFelix Eckhofer <[email protected]>2014-07-15 16:23:46 +0200
commit523bd90bafffee18d9c7652c68f4c08d25be339e (patch)
tree79f9b2062cedf8eab3b848eaf33b377fe4bf380c /classes/feeditem
parent06c4c9ebaec3187d5e74693d932814e8d991daba (diff)
Store size of enclosure to database
Diffstat (limited to 'classes/feeditem')
-rw-r--r--classes/feeditem/atom.php6
-rw-r--r--classes/feeditem/rss.php8
2 files changed, 14 insertions, 0 deletions
diff --git a/classes/feeditem/atom.php b/classes/feeditem/atom.php
index 48e3aa567..dfac7149f 100644
--- a/classes/feeditem/atom.php
+++ b/classes/feeditem/atom.php
@@ -145,6 +145,8 @@ class FeedItem_Atom extends FeedItem_Common {
$enc->type = $enclosure->getAttribute("type");
$enc->link = $enclosure->getAttribute("url");
$enc->length = $enclosure->getAttribute("length");
+ $enc->height = $enclosure->getAttribute("height");
+ $enc->width = $enclosure->getAttribute("width");
$desc = $this->xpath->query("media:description", $enclosure)->item(0);
if ($desc) $enc->title = strip_tags($desc->nodeValue);
@@ -164,6 +166,8 @@ class FeedItem_Atom extends FeedItem_Common {
$enc->type = $content->getAttribute("type");
$enc->link = $content->getAttribute("url");
$enc->length = $content->getAttribute("length");
+ $enc->height = $content->getAttribute("height");
+ $enc->width = $content->getAttribute("width");
$desc = $this->xpath->query("media:description", $content)->item(0);
if ($desc) {
@@ -184,6 +188,8 @@ class FeedItem_Atom extends FeedItem_Common {
$enc->type = "image/generic";
$enc->link = $enclosure->getAttribute("url");
+ $enc->height = $enclosure->getAttribute("height");
+ $enc->width = $enclosure->getAttribute("width");
array_push($encs, $enc);
}
diff --git a/classes/feeditem/rss.php b/classes/feeditem/rss.php
index bf08a1dfe..c9a7467cd 100644
--- a/classes/feeditem/rss.php
+++ b/classes/feeditem/rss.php
@@ -113,6 +113,8 @@ class FeedItem_RSS extends FeedItem_Common {
$enc->type = $enclosure->getAttribute("type");
$enc->link = $enclosure->getAttribute("url");
$enc->length = $enclosure->getAttribute("length");
+ $enc->height = $enclosure->getAttribute("height");
+ $enc->width = $enclosure->getAttribute("width");
array_push($encs, $enc);
}
@@ -125,6 +127,8 @@ class FeedItem_RSS extends FeedItem_Common {
$enc->type = $enclosure->getAttribute("type");
$enc->link = $enclosure->getAttribute("url");
$enc->length = $enclosure->getAttribute("length");
+ $enc->height = $enclosure->getAttribute("height");
+ $enc->width = $enclosure->getAttribute("width");
$desc = $this->xpath->query("media:description", $enclosure)->item(0);
if ($desc) $enc->title = strip_tags($desc->nodeValue);
@@ -144,6 +148,8 @@ class FeedItem_RSS extends FeedItem_Common {
$enc->type = $content->getAttribute("type");
$enc->link = $content->getAttribute("url");
$enc->length = $content->getAttribute("length");
+ $enc->height = $content->getAttribute("height");
+ $enc->width = $content->getAttribute("width");
$desc = $this->xpath->query("media:description", $content)->item(0);
if ($desc) {
@@ -164,6 +170,8 @@ class FeedItem_RSS extends FeedItem_Common {
$enc->type = "image/generic";
$enc->link = $enclosure->getAttribute("url");
+ $enc->height = $enclosure->getAttribute("height");
+ $enc->width = $enclosure->getAttribute("width");
array_push($encs, $enc);
}