Commit 6b20bf70 authored by Laurent's avatar Laurent
Browse files

Atom feed gets author in entries

parent 1a994aee
......@@ -89,7 +89,7 @@ class Zend_Feed_Atom extends Zend_Feed_Abstract
// Try to find a single <entry> instead.
$element = $this->_element->getElementsByTagName($this->_entryElementName)->item(0);
if (!$element) {
/**
/**
* @see Zend_Feed_Exception
*/
require_once 'Zend/Feed/Exception.php';
......@@ -287,9 +287,28 @@ class Zend_Feed_Atom extends Zend_Feed_Abstract
$link->setAttribute('href', $dataentry->link);
$entry->appendChild($link);
$summary = $this->_element->createElement('summary');
$summary->appendChild($this->_element->createCDATASection($dataentry->description));
$entry->appendChild($summary);
if (isset($dataentry->author)) {
$author = $this->_element->createElement('author');
$name = $this->_element->createElement('name', $dataentry->author['name']);
$author->appendChild($name);
if (isset($dataentry->author->email)) {
$email = $this->_element->createElement('email', $dataentry->author->email);
$author->appendChild($email);
}
if (isset($dataentry->author->link)) {
$link = $this->_element->createElement('link', $dataentry->author->link);
$author->appendChild($link);
}
$entry->appendChild($author);
}
if ($dataentry->description) {
$summary = $this->_element->createElement('summary');
$summary->appendChild($this->_element->createCDATASection($dataentry->description));
$entry->appendChild($summary);
}
if (isset($dataentry->content)) {
$content = $this->_element->createElement('content');
......@@ -376,7 +395,7 @@ class Zend_Feed_Atom extends Zend_Feed_Abstract
public function send()
{
if (headers_sent()) {
/**
/**
* @see Zend_Feed_Exception
*/
require_once 'Zend/Feed/Exception.php';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment