Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6565
Modified Files:
Tag: branch-smarty
NEWS serendipity_functions.inc.php
Log Message:
fixed wrong id for comment rss feed
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.419.2.40
retrieving revision 1.419.2.41
diff -u -d -r1.419.2.40 -r1.419.2.41
--- serendipity_functions.inc.php 5 Oct 2004 19:56:30 -0000 1.419.2.40
+++ serendipity_functions.inc.php 6 Oct 2004 09:55:02 -0000 1.419.2.41
@@ -1607,8 +1607,9 @@
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);
- $entryLink = serendipity_archiveURL($entry['id'], $entry['title']);
+ $entryLink = serendipity_archiveURL($id, $entry['title']);
if ($comments == true) {
// Display username as part of the title for easier feed-readability
$entry['title'] = $entry['username'] . ': ' . $entry['title'];
@@ -1621,17 +1622,7 @@
$ext = '';
}
- if (isset($_GET['all']) && $_GET['all']) {
- $addParam = array('no_scramble' => true);
- } else {
- $addParam = array();
- }
-
- serendipity_plugin_api::hook_event(
- 'frontend_display',
- $entry,
- $addParam
- );
+ serendipity_plugin_api::hook_event('frontend_display', $entry);
// Do some relative -> absolute URI replacing magic. Replaces all HREF/SRC (<a>, <img>, ...) references to only the serendipitypath with the full baseURL URI
// garvin: Could impose some problems. Closely watch this one.
$entry['body'] = preg_replace('@(href|src)=("|\')(' . preg_quote($serendipity['serendipityHTTPPath']) . ')(.*)("|\')(.*)>@imsU', '\1=\2' . $serendipity['baseURL'] . '\4\2\6>', $entry['body']);
@@ -1662,13 +1653,13 @@
<issued><?php echo gmdate('Y-m-d\TH:i:s\Z', $entry['timestamp']); ?></issued>
<created><?php echo gmdate('Y-m-d\TH:i:s\Z', $entry['timestamp']); ?></created>
<modified><?php echo gmdate('Y-m-d\TH:i:s\Z', $entry['last_modified']); ?></modified>
- <wfw:comment><?php echo $serendipity['baseURL']; ?>wfwcomment.php?cid=<?php echo (isset($entry['entryid']) && $entry['entryid'] != '' ? $entry['entryid'] : $entry['id']); ?></wfw:comment>
+ <wfw:comment><?php echo $serendipity['baseURL']; ?>wfwcomment.php?cid=<?php echo $id; ?></wfw:comment>
<?php
if ($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 (isset($entry['entryid']) && $entry['entryid'] != '' ? $entry['entryid'] : $entry['id']); ?></wfw:commentRss>
+ <wfw:commentRss><?php echo $serendipity['baseURL']; ?>rss.php?version=<?php echo $version; ?>&type=comments&cid=<?php echo $id; ?></wfw:commentRss>
<?php
}
?>
@@ -1700,12 +1691,12 @@
}
?>
<comments><?php echo $entryLink; ?>#comments</comments>
- <wfw:comment><?php echo $serendipity['baseURL']; ?>wfwcomment.php?cid=<?php echo (isset($entry['entryid']) && $entry['entryid'] != '' ? $entry['entryid'] : $entry['id']); ?></wfw:comment>
+ <wfw:comment><?php echo $serendipity['baseURL']; ?>wfwcomment.php?cid=<?php echo $id; ?></wfw:comment>
<?php
if ($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 (isset($entry['entryid']) && $entry['entryid'] != '' ? $entry['entryid'] : $entry['id']); ?></wfw:commentRss>
+ <wfw:commentRss><?php echo $serendipity['baseURL']; ?>rss.php?version=<?php echo $version; ?>&type=comments&cid=<?php echo $id; ?></wfw:commentRss>
<?php
}
?>
@@ -1759,12 +1750,12 @@
<dc:creator><?php echo serendipity_utf8_encode(htmlspecialchars($entry['email'])) . ' (' . serendipity_utf8_encode(htmlspecialchars($entry['username'])) . ')'; ?></dc:creator>
<dc:subject><?php echo serendipity_utf8_encode(htmlspecialchars(implode(', ', $categories))); ?></dc:subject>
<dc:date><?php echo date('Y-m-d\TH:i:s\Z', $entry['timestamp']); ?></dc:date>
- <wfw:comment><?php echo $serendipity['baseURL']; ?>wfwcomment.php?cid=<?php echo (isset($entry['entryid']) && $entry['entryid'] != '' ? $entry['entryid'] : $entry['id']); ?></wfw:comment>
+ <wfw:comment><?php echo $serendipity['baseURL']; ?>wfwcomment.php?cid=<?php echo $id; ?></wfw:comment>
<?php
if ($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 (isset($entry['entryid']) && $entry['entryid'] != '' ? $entry['entryid'] : $entry['id']); ?></wfw:commentRss>
+ <wfw:commentRss><?php echo $serendipity['baseURL']; ?>rss.php?version=<?php echo $version; ?>&type=comments&cid=<?php echo $id; ?></wfw:commentRss>
<?php
}
?>
Index: NEWS
===================================================================
RCS file: /cvsroot/php-blog/serendipity/NEWS,v
retrieving revision 1.214.2.25
retrieving revision 1.214.2.26
diff -u -d -r1.214.2.25 -r1.214.2.26
--- NEWS 27 Sep 2004 10:24:38 -0000 1.214.2.25
+++ NEWS 6 Oct 2004 09:54:45 -0000 1.214.2.26
@@ -29,6 +29,9 @@
Version 0.7 ()
------------------------------------------------------------------------
+ * Fixed wrong entry id displayed in RSS comment feed. Thanks to
+ romulus! (garvinhicking)
+
* Fixed file permission checks when removing images inside media
manager. Thanks to Thomas from the forums! (garvinhicking)
|