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

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


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

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

Modified: htdocs/branches/beta/atom.php
===================================================================
--- htdocs/branches/beta/atom.php	2011-09-24 16:49:40 UTC (rev 21329)
+++ htdocs/branches/beta/atom.php	2011-09-24 16:53:24 UTC (rev 21330)
@@ -34,47 +34,14 @@
   include("$top_dir/news/news-script.php");
 ?>
 
-<feed version="2.0" xmlns="http://www.w3.org/2005/Atom">
+<rss version="2.0" xmlns="http://www.w3.org/2005/Atom">
   <channel>
-  <id>http://www.gnucash.org/atom.php</id>
-  <title>GnuCash News</title>
+    <title>GnuCash News</title>
   <description>DESCRIPTION</description>
   <generator>GnuCash htdocs/trunk/atom.php 1.0 <gnucash-devel at gnucash.org></generator>
   <logo>http://www.gnucash.org/beta/images/icons/gnc-icon.png</logo>
   <link rel="alternate" href="http://www.gnucash.org/beta/" />
   <link rel="self" href="http://www.gnucash.org/beta/atom.php" />
-  <?php
-  $news_items = get_news($newsdir, $newsdir);
-  $news_items = array_slice($news_items, 0, $entry_count);
-  reset($news_items);
-  $most_recent = file(key($news_items));
-  $most_recent_update = chop($most_recent[1]);
-  ?>
-  <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>
-    <description><![CDATA[
-        <? for ($i=2; $i<$n; $i++) {
-            print ($fa[$i]);
-        } ?>
-    ]]></content>
-  </entry>
-  <?php
-  } ?>
   </channel>
-</feed>
+</rss>



More information about the gnucash-changes mailing list