Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17333
Modified Files:
rss.php serendipity_functions.inc.php
Log Message:
Changes to atom0.3 feed: use gmdate instead of date.
use well-formed atom:name and atom:email in entry author.
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.225
retrieving revision 1.226
diff -u -d -r1.225 -r1.226
--- serendipity_functions.inc.php 15 Mar 2004 09:10:24 -0000 1.225
+++ serendipity_functions.inc.php 18 Mar 2004 14:45:20 -0000 1.226
@@ -1377,12 +1377,13 @@
<entry>
<link href="<?php echo $guid; ?>" rel="alternate" title="<?php echo utf8_encode(htmlspecialchars($entry['title'])); ?>" type="text/html" />
<author>
- <name><?php echo utf8_encode(htmlspecialchars($entry['email'])) . ' (' . utf8_encode(htmlspecialchars($entry['username'])) . ')'; ?></name>
+ <name><?php utf8_encode(htmlspecialchars($entry['username'])); ?></name>
+ <email><?php echo utf8_encode(htmlspecialchars($entry['email'])); ?></email>
</author>
- <issued><?php echo date('Y-m-d\TH:i:s\Z', $entry['timestamp']); ?></issued>
- <created><?php echo date('Y-m-d\TH:i:s\Z', $entry['timestamp']); ?></created>
- <modified><?php echo date('Y-m-d\TH:i:s\Z', $entry['last_modified']); ?></modified>
+ <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>
<?php
Index: rss.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/rss.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- rss.php 18 Feb 2004 11:48:23 -0000 1.20
+++ rss.php 18 Mar 2004 14:45:20 -0000 1.21
@@ -170,7 +170,7 @@
HEAD;
break;
case 'atom0.3':
- $modified = date('Y-m-d\TH:i:s\Z', $entries[0]['last_modified']);
+ $modified = gmdate('Y-m-d\TH:i:s\Z', $entries[0]['last_modified']);
print <<<HEAD
<feed version="0.3"
xmlns="http://purl.org/atom/ns#"
@@ -215,4 +215,4 @@
}
/* vim: set sts=4 ts=4 expandtab : */
-?>
\ No newline at end of file
+?>
|