r21324 - htdocs/branches/beta - Test again atom feed modification just to understand how it works.

Cristian Marchi cmarchi at code.gnucash.org
Sat Sep 24 12:32:54 EDT 2011


Author: cmarchi
Date: 2011-09-24 12:32:53 -0400 (Sat, 24 Sep 2011)
New Revision: 21324
Trac: http://svn.gnucash.org/trac/changeset/21324

Modified:
   htdocs/branches/beta/atom.php
Log:
Test again atom feed modification just to understand how it works.

Modified: htdocs/branches/beta/atom.php
===================================================================
--- htdocs/branches/beta/atom.php	2011-09-24 16:26:09 UTC (rev 21323)
+++ htdocs/branches/beta/atom.php	2011-09-24 16:32:53 UTC (rev 21324)
@@ -9,7 +9,7 @@
   {
     $contentType = $overrideContentType;
   }
-  $charset = "iso-8859-1";
+  $charset = "utf-8";
   header("Content-Type: $contentType; charset=$charset");
 
   $entry_count = 1;
@@ -34,9 +34,10 @@
   include("$top_dir/news/news-script.php");
 ?>
 
-<feed xmlns="http://www.w3.org/2005/Atom">
-  <id>http://www.gnucash.org/atom.php</id>
+<rss version="2.0" xmlns="http://www.w3.org/2005/Atom">
+  <channel>
   <title>GnuCash News</title>
+  <description>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.</description>
   <generator>GnuCash htdocs/trunk/atom.php 1.0 <gnucash-devel at gnucash.org></generator>
   <logo>http://www.gnucash.org/beta/images/gnucash_logo.png</logo>
   <link rel="alternate" href="http://www.gnucash.org/beta/" />
@@ -57,7 +58,7 @@
     $title = strip_tags(chop($fa[0]));
     $update_date = chop($fa[1]);
     ?>
-  <entry>
+  <item>
     <id>urn:x-gnucash:news:<?= urlencode($key) ?></id>
     <title><?= $title ?></title>
     <link rel="alternate" href="http://www.gnucash.org/beta/#<?=generate_anchor($key);?>" />
@@ -71,8 +72,8 @@
             print ($fa[$i]);
         } ?>
     ]]></content>
-  </entry>
+  </item>
   <?php
   } ?>
-
-</feed>
+  </channel>
+</rss>



More information about the gnucash-changes mailing list