Switch the 'modify' code of admin/field.php to use templates
[bugdar.git] / syndicate.php
index 0f0329bbb9c35e0e6eac4f448a09e0362df95cf1..5131e25fa4ae2818ca3bc59b52a644aa66b0e609 100644 (file)
@@ -2,7 +2,7 @@
 /*=====================================================================*\
 || ###################################################################
 || # Bugdar
-|| # Copyright ©2002-2007 Blue Static
+|| # Copyright (c)2004-2009 Blue Static
 || #
 || # This program is free software; you can redistribute it and/or modify
 || # it under the terms of the GNU General Public License as published by
@@ -44,9 +44,9 @@ $bugs_fetch = $db->query("
        WHERE bug.product IN (" . fetch_on_bits('canviewbugs', fetch_guest_user()) . ")
                AND (!bug.hidden OR (bug.hidden AND bug.product IN (" . fetch_on_bits('canviewhidden', fetch_guest_user()) . ")))
        ORDER BY " . (can_perform('canviewhidden', 0, fetch_guest_user()) ? "bug.lastposttime" : "bug.hiddenlastposttime") . " DESC
-       LIMIT " . $bugsys->options['syndicateditems']
+       LIMIT " . bugdar::$options['syndicateditems']
 );
-while ($bug = $db->fetch_array($bugs_fetch))
+foreach ($bugs_fetch as $bug)
 {
        $syndicate .= '
        <entry>
@@ -68,21 +68,21 @@ while ($bug = $db->fetch_array($bugs_fetch))
                        </tr>
                        <tr>
                                <td><strong>' . T('Product/Component/Version') . ':</strong></td>
-                               <td>' . $bugsys->datastore['product']["$bug[product]"]['title'] . '/' . (($bug['component']) ? $bugsys->datastore['product']["$bug[component]"]['title'] . '/' : '') . $bugsys->datastore['version']["$bug[version]"]['version'] . '</td>
+                               <td>' . bugdar::$datastore['product']["$bug[product]"]['title'] . '/' . (($bug['component']) ? bugdar::$datastore['product']["$bug[component]"]['title'] . '/' : '') . bugdar::$datastore['version']["$bug[version]"]['version'] . '</td>
                        </tr>
                        <tr>
                                <td><strong>' . T('Status') . ':</strong></td>
-                               <td>' . $bugsys->datastore['status']["$bug[status]"]['status'] . '</td>
+                               <td>' . bugdar::$datastore['status']["$bug[status]"]['status'] . '</td>
                        </tr>
                        <tr>
                                <td><strong>' . T('Severity') . ':</strong></td>
-                               <td>' . $bugsys->datastore['severity']["$bug[severity]"]['severity'] . '</td>
+                               <td>' . bugdar::$datastore['severity']["$bug[severity]"]['severity'] . '</td>
                        </table>
                        
                        <p>' . $bug['comment_parsed'] . '</p>') . '
                </content>
                <summary type="text">' . htmlspecialchars($bug['comment_parsed']) . '</summary>
-               <link rel="alternate" href="' . $bugsys->options['trackerurl'] . '/showreport.php?bugid=' . $bug['bugid'] . '"/>
+               <link rel="alternate" href="' . bugdar::$options['trackerurl'] . '/showreport.php?bugid=' . $bug['bugid'] . '"/>
        </entry>';
        
        $lastupdated = $bug["$timestamp"];
@@ -91,8 +91,8 @@ while ($bug = $db->fetch_array($bugs_fetch))
 echo '<?xml version="1.0" encoding="' . $language['charset'] . '"?>
 <feed xmlns="http://www.w3.org/2005/Atom">
 
-       <title>' . sprintf(T('%1$s Syndication Feed'), $bugsys->options['trackertitle']) . '</title>
-       <link href="' . $bugsys->options['trackerurl'] . '"/>
+       <title>' . sprintf(T('%1$s Syndication Feed'), bugdar::$options['trackertitle']) . '</title>
+       <link href="' . bugdar::$options['trackerurl'] . '"/>
        <updated>' . gmdate('Y-m-d\TH:i:s\Z', $lastupdated) . '</updated>
        
        <!-- entries -->
@@ -105,10 +105,4 @@ echo '
 
 </feed>';
 
-/*=====================================================================*\
-|| ###################################################################
-|| # $HeadURL$
-|| # $Id$
-|| ###################################################################
-\*=====================================================================*/
 ?>
\ No newline at end of file