From: garvinhicking Date: Fri, 21 Oct 2005 12:19:42 +0000 (+0000) Subject: Hide emails in RSS feeds by default X-Git-Tag: 0.9~43 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=1723e12eff8706fe67db3b1096b5d4ac1f0be327;p=s9y.git Hide emails in RSS feeds by default --- diff --git a/docs/NEWS b/docs/NEWS index 9149dad..67a6346 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -3,6 +3,9 @@ Version 0.9-beta3 () ------------------------------------------------------------------------ + * Syndication plugin: Do not show E-Mail adress in RSS feed by default + (garvinhicking) + * Fix Bug where siteConfiguration was not available to chief editors. Thanks to Jannis! :) (garvinhicking) diff --git a/include/functions_rss.inc.php b/include/functions_rss.inc.php index 62aacdc..d400da5 100644 --- a/include/functions_rss.inc.php +++ b/include/functions_rss.inc.php @@ -16,15 +16,15 @@ function serendipity_printEntries_rss($entries, $version, $comments = false, $fu 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']) { @@ -41,7 +41,7 @@ function serendipity_printEntries_rss($entries, $version, $comments = false, $fu $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']) ."'"; @@ -53,7 +53,7 @@ function serendipity_printEntries_rss($entries, $version, $comments = false, $fu $entry['categories'] = array(0 => array('category_name' => $entry['category_name'])); } - if ($version == 'atom0.3') { + if ($options['version'] == 'atom0.3') { /*********** ATOM 0.3 FEED *************/ ?> @@ -69,10 +69,10 @@ function serendipity_printEntries_rss($entries, $version, $comments = false, $fu wfwcomment.php?cid= - rss.php?version=&type=comments&cid= + rss.php?version=&type=comments&cid= @@ -95,7 +95,7 @@ function serendipity_printEntries_rss($entries, $version, $comments = false, $fu ?> @@ -110,10 +110,10 @@ function serendipity_printEntries_rss($entries, $version, $comments = false, $fu wfwcomment.php?cid= - rss.php?version=&type=comments&cid= + rss.php?version=&type=comments&cid= @@ -151,7 +151,7 @@ function serendipity_printEntries_rss($entries, $version, $comments = false, $fu $cat) { ?>#comments wfwcomment.php?cid= - rss.php?version=&type=comments&cid= + rss.php?version=&type=comments&cid= @@ -201,7 +201,7 @@ function serendipity_printEntries_rss($entries, $version, $comments = false, $fu $cat) { $categories[] = $cat['category_name']; @@ -230,16 +230,16 @@ function serendipity_printEntries_rss($entries, $version, $comments = false, $fu wfwcomment.php?cid= - rss.php?version=&type=comments&cid= + rss.php?version=&type=comments&cid= add('type', 'boolean'); $propbag->add('name', SYNDICATION_PLUGIN_SHOW_MAIL); $propbag->add('description', ''); - $propbag->add('default', 'true'); + $propbag->add('default', false); break; case 'field_managingEditor': diff --git a/rss.php b/rss.php index fe2a4ef..165f78b 100644 --- a/rss.php +++ b/rss.php @@ -107,7 +107,7 @@ $metadata = array( 'link' => $serendipity['baseURL'], 'email' => $serendipity['email'], 'fullFeed' => false, - 'showMail' => showMail, + 'showMail' => false, 'version' => $version ); @@ -165,7 +165,7 @@ case '1.0': $entries = array(); } - if ($showMail) { + if ($metadata['showMail']) { $head_mail = ""; } else { $head_mail = ''; @@ -207,7 +207,7 @@ case '2.0': $entries = array(); } - if ($showMail) { + if ($metadata['showMail']) { $head_mail = ""; } else { $head_mail = ''; @@ -242,7 +242,7 @@ case 'atom0.3': $modified = gmdate('Y-m-d\TH:i:s\Z', serendipity_serverOffsetHour()); } - if ($showMail) { + if ($metadata['showMail']) { $head_mail = ""; } else { $head_mail = ''; @@ -280,7 +280,7 @@ case 'atom1.0': $modified = gmdate('Y-m-d\TH:i:s\Z', serendipity_serverOffsetHour()); } - if ($showMail) { + if ($metadata['showMail']) { $head_mail = ""; } else { $head_mail = '';