xref: /web-bugs/templates/search-rss2.php (revision 9d47b05f)
1<?php
2header('Content-type: application/rss+xml');
3echo '<?xml version="1.0"?>' . "\n";
4?>
5<rss version="2.0">
6 <channel>
7  <title><?php echo $siteBig; ?> Bug Search Results</title>
8<?php echo "  <link>{$site_method}://{$site_url}{$basedir}/rss/search.php?" , clean(http_build_query($_GET)) , "</link>\n"; ?>
9  <description>Search Results</description>
10<?php
11if ($total_rows > 0) {
12    foreach ($result as $row) {
13        echo "  <item>\n";
14        echo '   <title>' . clean($row['sdesc']) . "</title>\n";
15        echo "   <link>{$site_method}://{$site_url}{$basedir}/{$row['id']}</link>\n";
16        echo "   <category>{$row['status']}</category>\n";
17        echo '   <pubDate>' . date(DATE_RSS, $row['submitted']) . "</pubDate>\n";
18        echo "  </item>\n";
19    }
20} else {
21    $warnings[] = "No bugs matched your criteria";
22}
23?>
24 </channel>
25</rss>
26