add disclogs rss and sitemap and viewer
[disclosr.git] / documents / template.inc.php
blob:a/documents/template.inc.php -> blob:b/documents/template.inc.php
--- a/documents/template.inc.php
+++ b/documents/template.inc.php
@@ -130,21 +130,23 @@
 }
 
 function displayLogEntry($row, $idtoname) {
-    echo "<div><h2>".$row->value->date.": ".$row->value->title." (".$idtoname[$row->value->agencyID].")</h2> <p>".str_replace("\n","<br>",$row->value->description);
+    $result = "";
+    $result .= "<div><h2>".$row->value->date.": ".$row->value->title." (".$idtoname[$row->value->agencyID].")</h2> <p>".str_replace("\n","<br>",$row->value->description);
 if (isset($row->value->notes)) {
-echo " <br>Note: ".$row->value->notes;
+$result .= " <br>Note: ".$row->value->notes;
 }
-echo "</p>";
+$result .= "</p>";
 
 if (isset($row->value->links)){
-echo "<h3>Links/Documents</h3><ul>";
+$result .= "<h3>Links/Documents</h3><ul>";
 foreach ($row->value->links as $link) {
-    echo "<li><a href='$link'>".$link."</a></li>";
+    $result .= "<li><a href='$link'>".$link."</a></li>";
 }
 
-        echo "</ul>";
+        $result .= "</ul>";
 }
-        echo "<small><A href='".$row->value->url."'>View original source...</a> ID: ".$row->value->docID."</small>";
-echo"</div>";
+        $result .= "<small><A href='".$row->value->url."'>View original source...</a> ID: ".$row->value->docID."</small>";
+$result .= "</div>";
+return $result;
 }