r21338 - htdocs/branches/beta - The problem is on the entry tag.
Cristian Marchi
cmarchi at code.gnucash.org
Sat Sep 24 13:56:11 EDT 2011
Author: cmarchi
Date: 2011-09-24 13:56:11 -0400 (Sat, 24 Sep 2011)
New Revision: 21338
Trac: http://svn.gnucash.org/trac/changeset/21338
Modified:
htdocs/branches/beta/atom.php
htdocs/branches/beta/test-feed.xml
Log:
The problem is on the entry tag.
Modified: htdocs/branches/beta/atom.php
===================================================================
--- htdocs/branches/beta/atom.php 2011-09-24 17:49:28 UTC (rev 21337)
+++ htdocs/branches/beta/atom.php 2011-09-24 17:56:11 UTC (rev 21338)
@@ -50,6 +50,29 @@
?>
<updated><?= date_convert_news_to_atom($most_recent_update) ?></updated>
+ <?php for (reset($news_items); $key = key($news_items); next($news_items))
+ {
+ $fa = file($key);
+ $n = count($fa);
+ $title = strip_tags(chop($fa[0]));
+ $update_date = chop($fa[1]);
+ ?>
+ <entry>
+ <id>urn:x-gnucash:news:<?= urlencode($key) ?></id>
+ <title><?= $title ?></title>
+ <link rel="alternate" href="http://www.gnucash.org/beta/#<?=generate_anchor($key);?>" />
+ <author>
+ <name>GnuCash Developers</name>
+ <email>gnucash-devel at gnucash.org</email>
+ </author>
+ <updated><?= date_convert_news_to_atom($update_date) ?></updated>
+ <summary>
+ <? for ($i=2; $i<$n; $i++) {
+ print htmlentities($fa[$i]);
+ } ?>
+ <summary>
+ </entry>
+ <?php
+ } ?>
-
</feed>
Modified: htdocs/branches/beta/test-feed.xml
===================================================================
--- htdocs/branches/beta/test-feed.xml 2011-09-24 17:49:28 UTC (rev 21337)
+++ htdocs/branches/beta/test-feed.xml 2011-09-24 17:56:11 UTC (rev 21338)
@@ -1,26 +1,13 @@
-<?xml version="1.0" encoding="utf-8"?>
-
+<?xml version="1.0" encoding="iso-8859-1"?>
<feed xmlns="http://www.w3.org/2005/Atom">
-
- <title>Example Feed</title>
- <subtitle>A subtitle.</subtitle>
- <link href="http://example.org/feed/" rel="self" />
- <link href="http://example.org/" />
- <id>urn:uuid:60a76c80-d399-11d9-b91C-0003939e0af6</id>
- <updated>2003-12-13T18:30:02Z</updated>
- <author>
- <name>John Doe</name>
- <email>johndoe at example.com</email>
- </author>
-
- <entry>
- <title>Atom-Powered Robots Run Amok</title>
- <link href="http://example.org/2003/12/13/atom03" />
- <link rel="alternate" type="text/html" href="http://example.org/2003/12/13/atom03.html"/>
- <link rel="edit" href="http://example.org/2003/12/13/atom03/edit"/>
- <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
- <updated>2003-12-13T18:30:02Z</updated>
- <summary>Some text.</summary>
- </entry>
-
+ <title>GnuCash News</title>
+ <subtitle>GnuCash is personal and small-business financial-accounting software, freely licensed under the GNU GPL and available for GNU/Linux, BSD, Solaris, Mac OS X and Microsoft Windows.</subtitle>
+ <generator>GnuCash htdocs/trunk/atom.php 1.0 <gnucash-devel at gnucash.org></generator>
+ <logo>http://www.gnucash.org/images/gnucash_logo.png</logo>
+ <link rel="alternate" href="http://www.gnucash.org/beta/" />
+ <link rel="self" href="http://www.gnucash.org/beta/atom.php" />
+ <updated>2011-09-23T00:00:00-05:00</updated>
+
+
+
</feed>
More information about the gnucash-changes
mailing list