www: 77f8cddb: Echo all this stuff from php instead of ...

markdoliner at pidgin.im markdoliner at pidgin.im
Sun Aug 7 04:06:22 EDT 2011


----------------------------------------------------------------------
Revision: 77f8cddb67dc36ebd878a6e17875898a32c880f1
Parent:   f0ec348c8f5fb8395de90f7945d3bd8cda5e7889
Author:   markdoliner at pidgin.im
Date:     08/07/11 04:03:59
Branch:   im.pidgin.www
URL: http://d.pidgin.im/viewmtn/revision/info/77f8cddb67dc36ebd878a6e17875898a32c880f1

Changelog: 

Echo all this stuff from php instead of going in and out of the php
interpreter.  I think this is cleaner/easier to follow

Changes against parent f0ec348c8f5fb8395de90f7945d3bd8cda5e7889

  patched  htdocs/news/security/index.php

-------------- next part --------------
============================================================
--- htdocs/news/security/index.php	67dd1e7e0f2b0e253db2d6e480341355961d6d8a
+++ htdocs/news/security/index.php	e845053654c93ada19b3785a05d90bba825891e4
@@ -666,30 +666,19 @@ if ($stop > 0) {
 <h1>Pidgin Security Advisory</h1>
 
 <table>
-  <tr><th>Title</th><td><?php echo $vun['title'] ?></td></tr>
-  <tr><th>Date</th><td><?php echo $vun['date'] ?></td></tr>
-  <?php
-	if (!empty($vun['cve'])) {
-  ?>
-  <tr><th>CVE Name</th><td><a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=<?php echo $vun['cve'] ?>"><?php echo $vun['cve'] ?></a></td></tr>
-  <?php
-	} else {
-  ?>
-  <tr><th>CVE Name</th><td>N/A</td></tr>
-  <?php
-	}
-  ?>
-  <tr><th>Discovered By</th><td><?php echo $vun['discoveredby'] ?></td></tr>
-  <?php
+
+<?php
+	$cve_name = empty($vun['cve']) ? "N/A" : "<a href=\"http://cve.mitre.org/cgi-bin/cvename.cgi?name=" . $vun['cve'] . "\">" . $vun['cve'] . "</a>";
+
+	echo "<tr><th>Title</th><td>", $vun['title'], "</td></tr>\n";
+	echo "<tr><th>Date</th><td>", $vun['date'], "</td></tr>\n";
+	echo "<tr><th>CVE Name</th><td>", $cve_name, "</td></tr>\n";
+	echo "<tr><th>Discovered By</th><td>", $vun['discoveredby'], "</td></tr>\n";
     if (!empty($vun['summary'])) {
-  ?>
-  <tr><th>Summary</th><td><?php echo $vun['summary'] ?></td></tr>
-  <?php
+		echo "<tr><th>Summary</th><td>", $vun['summary'], "</td></tr>\n";
     }
-  ?>
-  <tr><th>Description</th><td><?php echo $vun['description'] ?></td></tr>
+	echo "<tr><th>Description</th><td>", $vun['description'], "</td></tr>\n";
 
-  <?php
 	if (!empty($vun['fixrevisions'])) {
 		// fixrevisions is a comma delimited list of revisions.  Linkify each one individually.
 		$fixrevisions = '';
@@ -698,14 +687,12 @@ if ($stop > 0) {
 				$fixrevisions .= "<br/>";
 			$fixrevisions .= "<a href=\"http://developer.pidgin.im/viewmtn/revision/info/$revision\">$revision</a>";
 		}
-  ?>
-  <tr><th>Fixed in Revision</th><td><?php echo $fixrevisions ?></td></tr>
-  <?php
+		echo "<tr><th>Fixed in Revision</th><td>", $fixrevisions, "</td></tr>\n";
     }
-  ?>
 
-  <tr><th>Fixed in Version</th><td><?php echo $vun['fixedversion'] ?></td></tr>
-  <tr><th>Fix</th><td><?php echo $vun['fix'] ?></td></tr>
+	echo "<tr><th>Fixed in Version</th><td>", $vun['fixedversion'], "</td></tr>\n";
+	echo "<tr><th>Fix</th><td>", $vun['fix'], "</td></tr>\n";
+?>
 </table>
 
 <p><a href="?offset=0">Return to Security Advisory Index</a></p>


More information about the Commits mailing list