Browse Source

support dc:creator

Andrew Dolgov 7 years ago
parent
commit
f11015058d
2 changed files with 13 additions and 0 deletions
  1. 7 0
      classes/feeditem/atom.php
  2. 6 0
      classes/feeditem/rss.php

+ 7 - 0
classes/feeditem/atom.php

@@ -138,6 +138,13 @@ class FeedItem_Atom {
 			if ($email) return $email->nodeValue;
 
 		}
+
+		$author = $this->xpath->query("dc:creator", $this->elem)->item(0);
+
+		if ($author) {
+			return $author->nodeValue;
+		}
+
 	}
 }
 ?>

+ 6 - 0
classes/feeditem/rss.php

@@ -129,8 +129,14 @@ class FeedItem_RSS {
 			$email = $author->getElementsByTagName("email")->item(0);
 
 			if ($email) return $email->nodeValue;
+		}
+
+		$author = $this->xpath->query("dc:creator", $this->elem)->item(0);
 
+		if ($author) {
+			return $author->nodeValue;
 		}
+
 	}
 }
 ?>