Skip to content

Commit

Permalink
support comments on simplepie properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Dolgov committed Dec 22, 2012
1 parent 35cb2b8 commit 83e6e31
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions include/rssfuncs.php
Original file line number Diff line number Diff line change
Expand Up @@ -678,14 +678,19 @@ function update_rss_feed($link, $feed, $ignore_daemon = false, $no_cache = false
$entry_author = mb_substr($entry_author, 0, 250);

if ($use_simplepie) {
$num_comments = 0; #FIXME#
$num_comments = $item->get_item_tags('http://purl.org/rss/1.0/modules/slash/', 'comments');

if (is_array($num_comments) && is_array($num_comments[0])) {
$num_comments = (int) $num_comments[0]["data"];
} else {
$num_comments = 0;
}
} else {
$num_comments = db_escape_string($item["slash"]["comments"]);
$num_comments = (int) $item["slash"]["comments"];
}

if (!$num_comments) $num_comments = 0;

if ($debug_enabled) {
_debug("update_rss_feed: num_comments: $num_comments");
_debug("update_rss_feed: looking for tags [1]...");
}

Expand Down

0 comments on commit 83e6e31

Please sign in to comment.