summaryrefslogtreecommitdiff
path: root/classes/feeditem
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2019-08-02 06:22:42 +0300
committerAndrew Dolgov <[email protected]>2019-08-02 06:22:42 +0300
commitaa40a268f0b11cf40a031d451e23f2ab1af333bb (patch)
tree732f28e2069fec088a98706b05ea542baa45a7d3 /classes/feeditem
parent4edfb526e112aab29214655804ce24215c87c4bd (diff)
parser: support multiple dc:creator elements (returns as comma-separated list)
Diffstat (limited to 'classes/feeditem')
-rwxr-xr-xclasses/feeditem/common.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/classes/feeditem/common.php b/classes/feeditem/common.php
index de8d3aefa..3193ed273 100755
--- a/classes/feeditem/common.php
+++ b/classes/feeditem/common.php
@@ -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() {