Joó Ádám
2008-01-16 23:01:12 UTC
Hello,
I'm trying to generate an RSS feed via Zend_Feed. The problem is that
every single entry gets the the current pubDate value, although before
calling Zend_Feed::importArray() the dates are correct.
The code is:
$feed = array(
'charset' => 'utf-8',
'description' => $this->name . ' – megjegyzések',
'language' => 'hu',
'link' => 'http://' . $_SERVER['SERVER_NAME'] .
$this->url(array('view' => 'rss'), 'Comments_Application_Views'),
'title' => $this->name . ' « Megjegyzések « Letöltelek',
);
foreach ($this->comments as $comment) {
$feed['entries'][] = array(
'description' => $comment['body'],
'guid' => 'http://' . $_SERVER['SERVER_NAME'] .
$this->url(array('id' => $this->id), 'Applications_Index') .
'#comment' . $comment['id'],
'link' => 'http://' . $_SERVER['SERVER_NAME'] .
$this->url(array('id' => $this->id), 'Applications_Index') .
'#comment' . $comment['id'],
'published' => date('r', $comment['date']),
'title' => $comment['username'],
);
}
Zend_Feed::importArray($feed, 'rss'
I'm trying to generate an RSS feed via Zend_Feed. The problem is that
every single entry gets the the current pubDate value, although before
calling Zend_Feed::importArray() the dates are correct.
The code is:
$feed = array(
'charset' => 'utf-8',
'description' => $this->name . ' – megjegyzések',
'language' => 'hu',
'link' => 'http://' . $_SERVER['SERVER_NAME'] .
$this->url(array('view' => 'rss'), 'Comments_Application_Views'),
'title' => $this->name . ' « Megjegyzések « Letöltelek',
);
foreach ($this->comments as $comment) {
$feed['entries'][] = array(
'description' => $comment['body'],
'guid' => 'http://' . $_SERVER['SERVER_NAME'] .
$this->url(array('id' => $this->id), 'Applications_Index') .
'#comment' . $comment['id'],
'link' => 'http://' . $_SERVER['SERVER_NAME'] .
$this->url(array('id' => $this->id), 'Applications_Index') .
'#comment' . $comment['id'],
'published' => date('r', $comment['date']),
'title' => $comment['username'],
);
}
Zend_Feed::importArray($feed, 'rss'