1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 01:36:30 +00:00

parser: support multiple dc:creator elements (returns as comma-separated list)

This commit is contained in:
Andrew Dolgov
2019-08-02 06:22:42 +03:00
parent 4edfb526e1
commit aa40a268f0

View File

@@ -41,11 +41,14 @@ abstract class FeedItem_Common extends FeedItem {
return clean($author->nodeValue);
}
$author = $this->xpath->query("dc:creator", $this->elem)->item(0);
$author_elems = $this->xpath->query("dc:creator", $this->elem);
$authors = [];
if ($author) {
return clean($author->nodeValue);
foreach ($author_elems as $author) {
array_push($authors, clean($author->nodeValue));
}
return implode(", ", $authors);
}
function get_comments_url() {