if (is_array($entries)) {
foreach ($entries as $entry) {
$id = (isset($entry['entryid']) && !empty($entry['entryid']) ? $entry['entryid'] : $entry['id']);
- $guid = serendipity_rss_getguid($entry, $comments);
+ $guid = serendipity_rss_getguid($entry, $options['comments']);
$entryLink = serendipity_archiveURL($id, $entry['title'], 'baseURL', true, array('timestamp' => $entry['timestamp']));
- if ($comments == true) {
+ if ($options['comments'] == true) {
// Display username as part of the title for easier feed-readability
$entry['title'] = $entry['author'] . ': ' . $entry['title'];
}
// Embed a link to extended entry, if existing
- if ($fullFeed) {
+ if ($options['fullFeed']) {
$entry['body'] .= ' ' . $entry['extended'];
$ext = '';
} elseif ($entry['exflag']) {
$entry['body'] = xhtml_cleanup($entry['body']);
// extract author information
- if ((isset($entry['no_email']) && $entry['no_email']) || !$showMail) {
+ if ((isset($entry['no_email']) && $entry['no_email']) || $options['showMail'] === FALSE) {
$entry['email'] = 'nospam@example.com'; // RSS Feeds need an E-Mail address!
} elseif (empty($entry['email'])) {
$query = "select email FROM {$serendipity['dbPrefix']}authors WHERE authorid = '". serendipity_db_escape_string($entry['authorid']) ."'";
$entry['categories'] = array(0 => array('category_name' => $entry['category_name']));
}
- if ($version == 'atom0.3') {
+ if ($options['version'] == 'atom0.3') {
/*********** ATOM 0.3 FEED *************/
?>
<entry>
<wfw:comment><?php echo $serendipity['baseURL']; ?>wfwcomment.php?cid=<?php echo $id; ?></wfw:comment>
<?php
- if ($comments === false) {
+ if ($options['comments'] === false) {
?>
<slash:comments><?php echo $entry['comments']; ?></slash:comments>
- <wfw:commentRss><?php echo $serendipity['baseURL']; ?>rss.php?version=<?php echo $version; ?>&type=comments&cid=<?php echo $id; ?></wfw:commentRss>
+ <wfw:commentRss><?php echo $serendipity['baseURL']; ?>rss.php?version=<?php echo $options['version']; ?>&type=comments&cid=<?php echo $id; ?></wfw:commentRss>
<?php
}
?>
?>
</entry>
<?php
- } elseif ($version == 'atom1.0') {
+ } elseif ($options['version'] == 'atom1.0') {
/*********** ATOM 1.0 FEED *************/
?>
<entry>
<wfw:comment><?php echo $serendipity['baseURL']; ?>wfwcomment.php?cid=<?php echo $id; ?></wfw:comment>
<?php
- if ($comments === false) {
+ if ($options['comments'] === false) {
?>
<slash:comments><?php echo $entry['comments']; ?></slash:comments>
- <wfw:commentRss><?php echo $serendipity['baseURL']; ?>rss.php?version=<?php echo $version; ?>&type=comments&cid=<?php echo $id; ?></wfw:commentRss>
+ <wfw:commentRss><?php echo $serendipity['baseURL']; ?>rss.php?version=<?php echo $options['version']; ?>&type=comments&cid=<?php echo $id; ?></wfw:commentRss>
<?php
}
</entry>
<?php
- } elseif ($version == '0.91' || $version == '2.0') {
+ } elseif ($options['version'] == '0.91' || $options['version'] == '2.0') {
/*********** BEGIN RSS 0.91/2.0 FEED *************/
?>
<item>
<?php
/*********** END RSS 0.91/2.0 FEED *************/
- if ($version == '2.0') {
+ if ($options['version'] == '2.0') {
/*********** RSS 2.0 FEED EXTRAS *************/
foreach ($entry['categories'] AS $idx => $cat) {
?><category><?php echo serendipity_utf8_encode(htmlspecialchars($cat['category_name'])); ?></category><?php
<comments><?php echo $entryLink; ?>#comments</comments>
<wfw:comment><?php echo $serendipity['baseURL']; ?>wfwcomment.php?cid=<?php echo $id; ?></wfw:comment>
<?php
- if ($comments === false) {
+ if ($options['comments'] === false) {
?>
<slash:comments><?php echo $entry['comments']; ?></slash:comments>
- <wfw:commentRss><?php echo $serendipity['baseURL']; ?>rss.php?version=<?php echo $version; ?>&type=comments&cid=<?php echo $id; ?></wfw:commentRss>
+ <wfw:commentRss><?php echo $serendipity['baseURL']; ?>rss.php?version=<?php echo $options['version']; ?>&type=comments&cid=<?php echo $id; ?></wfw:commentRss>
<?php
}
?>
<?php
/*********** END RSS 0.91 FEED EXTRAS *************/
}
- } else if ($version == '1.0') {
+ } else if ($options['version'] == '1.0') {
$categories = array();
foreach ($entry['categories'] AS $idx => $cat) {
$categories[] = $cat['category_name'];
<dc:date><?php echo date('Y-m-d\TH:i:s\Z', serendipity_serverOffsetHour($entry['timestamp'])); ?></dc:date>
<wfw:comment><?php echo $serendipity['baseURL']; ?>wfwcomment.php?cid=<?php echo $id; ?></wfw:comment>
<?php
- if ($comments === false) {
+ if ($options['comments'] === false) {
?>
<slash:comments><?php echo $entry['comments']; ?></slash:comments>
- <wfw:commentRss><?php echo $serendipity['baseURL']; ?>rss.php?version=<?php echo $version; ?>&type=comments&cid=<?php echo $id; ?></wfw:commentRss>
+ <wfw:commentRss><?php echo $serendipity['baseURL']; ?>rss.php?version=<?php echo $options['version']; ?>&type=comments&cid=<?php echo $id; ?></wfw:commentRss>
<?php
}
?>
</item>
<?php
- } elseif ($version == 'opml1.0') {
+ } elseif ($options['version'] == 'opml1.0') {
?>
<outline text="<?php echo serendipity_utf8_encode(htmlspecialchars($entry['title'])); ?>" type="url" htmlUrl="<?php echo $entryLink; ?>" urlHTTP="<?php echo $entryLink; ?>" />
<?php
'link' => $serendipity['baseURL'],
'email' => $serendipity['email'],
'fullFeed' => false,
- 'showMail' => showMail,
+ 'showMail' => false,
'version' => $version
);
$entries = array();
}
- if ($showMail) {
+ if ($metadata['showMail']) {
$head_mail = "<admin:errorReportsTo rdf:resource=\"mailto:{$metadata['email']}\" />";
} else {
$head_mail = '';
$entries = array();
}
- if ($showMail) {
+ if ($metadata['showMail']) {
$head_mail = "<admin:errorReportsTo rdf:resource=\"mailto:{$metadata['email']}\" />";
} else {
$head_mail = '';
$modified = gmdate('Y-m-d\TH:i:s\Z', serendipity_serverOffsetHour());
}
- if ($showMail) {
+ if ($metadata['showMail']) {
$head_mail = "<admin:errorReportsTo rdf:resource=\"mailto:{$metadata['email']}\" />";
} else {
$head_mail = '';
$modified = gmdate('Y-m-d\TH:i:s\Z', serendipity_serverOffsetHour());
}
- if ($showMail) {
+ if ($metadata['showMail']) {
$head_mail = "<admin:errorReportsTo rdf:resource=\"mailto:{$metadata['email']}\" />";
} else {
$head_mail = '';