[Collab-qa-commits] r693 - wnpp

sping-guest at alioth.debian.org sping-guest at alioth.debian.org
Sun Feb 3 14:45:24 UTC 2008


Author: sping-guest
Date: 2008-02-03 14:45:24 +0000 (Sun, 03 Feb 2008)
New Revision: 693

Modified:
   wnpp/news.php5
Log:
Guid conflicts solved

Modified: wnpp/news.php5
===================================================================
--- wnpp/news.php5	2008-02-02 18:34:47 UTC (rev 692)
+++ wnpp/news.php5	2008-02-03 14:45:24 UTC (rev 693)
@@ -159,6 +159,7 @@
     $description = $entry['description'];
     $event = $entry['event'];
     $rfc822 = date("r", $entry['unix_event_stamp']);
+    $guid_layout = ($entry['unix_event_stamp'] <= 1202047202 + 1200) ? 0 : 1;
 
     switch($event) {
     case 'CLOSE':
@@ -194,6 +195,17 @@
     $title = escape_xml($title);
 
     $url = 'http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=' . $ident;
+    switch ($guid_layout) {
+    case 1:
+        $guid = 'http://debian.binera.de/wnpp/' . $ident . '/' . $entry['unix_event_stamp'];
+        break;
+
+    case 0: // fall through
+    default:
+        $guid = 'http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=' . $ident;
+        break;
+
+    }
     $author = $ident . '@bugs.debian.org';
 
     echo "    <item>\n";
@@ -201,7 +213,7 @@
     echo "      <link>$url</link>\n";
     echo "      <description>$url</description>\n";
     echo "      <pubDate>$rfc822</pubDate>\n";
-    echo "      <guid>$url</guid>\n";
+    echo "      <guid>$guid</guid>\n";
     echo "      <dc:creator>$author</dc:creator>\n";
     echo "    </item>\n";
 }




More information about the Collab-qa-commits mailing list