]> dev.renevier.net Git - syp.git/blobdiff - news.php
small code cleanup (indentation, missing copyrights, etc)
[syp.git] / news.php
index 615989f0fb3d00318808ecea45fe3487b02c2ae6..9bdefd18cc54da0821569ad5a97956d75804b080 100644 (file)
--- a/news.php
+++ b/news.php
@@ -22,8 +22,8 @@ function date3339 ($feature) {
     return $date;
 }
 
+// method from http://diveintomark.org/archives/2004/05/28/howto-atom-id#other
 function unique_id_from_feature ($feature) {
-    // method from http://diveintomark.org/archives/2004/05/28/howto-atom-id#other
     $date = date('Y-m-d', $feature->date);
     $res = sprintf("tag:%s,%s:%d", gethost(), $date, $feature->id);
     return $res;
@@ -36,9 +36,9 @@ function unique_id_from_site () {
 }
 
 function main ($features) {
-    print "<?xml version=\"1.0\" encoding=\"utf-8\"?>
+    printf ("<?xml version=\"1.0\" encoding=\"utf-8\"?>
 <feed xmlns=\"http://www.w3.org/2005/Atom\"
-      xmlns:georss=\"http://www.georss.org/georss\">\n";
+      xmlns:georss=\"http://www.georss.org/georss\">\n");
 
     printf("  <link rel=\"alternate\" type=\"text/html\" href=\"%s\"/>\n",
             full_url_from_path (""));
@@ -60,10 +60,10 @@ function main ($features) {
         printf("   </author>\n");
     }
 
-    print "\n";
+    printf ("\n");
 
     foreach ($features as $feature) {
-        print ("    <entry>\n");
+        printf ("    <entry>\n");
 
         if ($feature->title) {
             $title = htmlspecialchars ($feature->title, ENT_QUOTES);
@@ -88,7 +88,7 @@ function main ($features) {
         }
 
         if (strlen ($contentHTML) != 0) {
-            printf("       <content type=\"html\">
+            printf ("       <content type=\"html\">
                 %s
        </content>\n", htmlspecialchars ($contentHTML));
         }
@@ -98,7 +98,7 @@ function main ($features) {
 
         printf("    </entry>\n\n");
     }
-    print '</feed>';
+    printf ("</feed>");
 }
 
 try {