summaryrefslogtreecommitdiff
path: root/classes/feeditem/rss.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-05-01 20:55:08 +0400
committerAndrew Dolgov <[email protected]>2013-05-01 20:55:08 +0400
commitd4992d6b48ed458ae3ff39c5cd5ac19244ccd6a8 (patch)
treefa9dcf17ff825b3304a94aba34dc559c3b45a13d /classes/feeditem/rss.php
parentee78f81ccdcc12055927a708e31ab0a85442b27b (diff)
add support for dc:subject and slash:comments
Diffstat (limited to 'classes/feeditem/rss.php')
-rw-r--r--classes/feeditem/rss.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/classes/feeditem/rss.php b/classes/feeditem/rss.php
index e5e2a8e56..7a3b0d342 100644
--- a/classes/feeditem/rss.php
+++ b/classes/feeditem/rss.php
@@ -63,9 +63,12 @@ class FeedItem_RSS {
}
- // todo
function get_comments_count() {
+ $comments = $this->xpath->query("slash:comments", $this->elem)->item(0);
+ if ($comments) {
+ return $comments->nodeValue;
+ }
}
function get_categories() {
@@ -76,6 +79,12 @@ class FeedItem_RSS {
array_push($cats, $cat->nodeValue);
}
+ $categories = $this->xpath->query("dc:subject", $this->elem);
+
+ foreach ($categories as $cat) {
+ array_push($cats, $cat->nodeValue);
+ }
+
return $cats;
}
@@ -96,8 +105,6 @@ class FeedItem_RSS {
$enclosures = $this->xpath->query("media:content", $this->elem);
- $encs = array();
-
foreach ($enclosures as $enclosure) {
$enc = new FeedEnclosure();