diff options
author | Andrew Dolgov <[email protected]> | 2012-12-22 11:33:03 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2012-12-22 11:33:03 +0400 |
commit | d020a86c36327fd823a1eb8e61c52b6663985980 (patch) | |
tree | add8d5bcd5ce3c5c242263b2cbd7a722a3ef1579 /include/rssfuncs.php | |
parent | ca3bb6c75f5bc2430d7e57ec868813ea4407c544 (diff) |
support comments for simplepie
Diffstat (limited to 'include/rssfuncs.php')
-rw-r--r-- | include/rssfuncs.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/rssfuncs.php b/include/rssfuncs.php index eaa975a5a..05f8bb3d8 100644 --- a/include/rssfuncs.php +++ b/include/rssfuncs.php @@ -634,7 +634,12 @@ $entry_cached_content = ""; if ($use_simplepie) { - $entry_comments = strip_tags($item->data["comments"]); + $entry_comments = $item->get_item_tags('http://purl.org/rss/1.0/modules/slash/', 'comments'); + + if (is_array($entry_comments) && is_array($entry_comments[0])) { + $entry_comments = (int) $entry_comments[0]["data"]; + } + if ($item->get_author()) { $entry_author_item = $item->get_author(); $entry_author = $entry_author_item->get_name(); @@ -643,7 +648,7 @@ $entry_author = db_escape_string($entry_author); } } else { - $entry_comments = strip_tags($item["comments"]); + $entry_comments = (int) $item["comments"]; $entry_author = db_escape_string(strip_tags($item['dc']['creator'])); |