1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 19:05:55 +00:00

add support for dc:subject and slash:comments

This commit is contained in:
Andrew Dolgov
2013-05-01 20:55:08 +04:00
parent ee78f81ccd
commit d4992d6b48
4 changed files with 37 additions and 11 deletions

View File

@@ -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();