[35216] trunk/www/ports.php
jmpp at macports.org
jmpp at macports.org
Thu Mar 20 21:22:45 PDT 2008
Revision: 35216
http://trac.macosforge.org/projects/macports/changeset/35216
Author: jmpp at macports.org
Date: 2008-03-20 21:22:44 -0700 (Thu, 20 Mar 2008)
Log Message:
-----------
Always use mysql_fetch_row() when fetching a port's properties and access the returned array numerically, for consistency.
Modified Paths:
--------------
trunk/www/ports.php
Modified: trunk/www/ports.php
===================================================================
--- trunk/www/ports.php 2008-03-21 04:01:26 UTC (rev 35215)
+++ trunk/www/ports.php 2008-03-21 04:22:44 UTC (rev 35216)
@@ -138,7 +138,7 @@
if ($nresult) {
$primary = 1;
print '<i>Maintained by:</i>';
- while ($nrow = mysql_fetch_array($nresult)) {
+ while ($nrow = mysql_fetch_row($nresult)) {
if ($primary) { print ' <b>'; }
else { print ' '; }
print obfuscate_email($nrow[0]);;
@@ -154,11 +154,11 @@
if ($nresult) {
$primary = 1;
print '<br /><i>Categories:</i>';
- while ($nrow = mysql_fetch_assoc($nresult)) {
+ while ($nrow = mysql_fetch_row($nresult)) {
if ($primary) { print ' <b>'; }
else { print ' '; }
- print '<a href="' . $_SERVER['PHP_SELF'] . '?by=category&substr=' . urlencode($nrow['category']) . '">'
- . htmlspecialchars($nrow['category']) . '</a>';
+ print '<a href="' . $_SERVER['PHP_SELF'] . '?by=category&substr=' . urlencode($nrow[0]) . '">'
+ . htmlspecialchars($nrow[0]) . '</a>';
if ($primary) { print '</b>'; }
$primary = 0;
}
@@ -170,7 +170,7 @@
$nresult = mysql_query($nquery);
if ($nresult && mysql_num_rows($nresult) > 0) {
print '<br /><i>Platforms:</i> ';
- while ($nrow = mysql_fetch_array($nresult)) {
+ while ($nrow = mysql_fetch_row($nresult)) {
print '<a href="' . $_SERVER['PHP_SELF'] . '?by=platform&substr=' . urlencode($nrow[0]) . '">'
. htmlspecialchars($nrow[0]) . '</a> ';
}
@@ -182,7 +182,7 @@
$nresult = mysql_query($nquery);
if ($nresult && mysql_num_rows($nresult) > 0) {
print '<br /><i>Dependencies:</i> ';
- while ($nrow = mysql_fetch_array($nresult)) {
+ while ($nrow = mysql_fetch_row($nresult)) {
// lib:libpng.3:libpng -> libpng
// might need adapting to the new port: depspec
$library = eregi_replace('^([^:]*:[^:]*:|[^:]*:)', '', $nrow[0]);
@@ -197,7 +197,7 @@
$nresult = mysql_query($nquery);
if ($nresult && mysql_num_rows($nresult) > 0) {
print '<br /><i>Variants:</i> ';
- while ($nrow = mysql_fetch_array($nresult)) {
+ while ($nrow = mysql_fetch_row($nresult)) {
print '<a href="' . $_SERVER['PHP_SELF'] . '?by=variant&substr=' . urlencode($nrow[0]) . '">'
. htmlspecialchars($nrow[0]) . '</a> ';
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080320/37def9ff/attachment.html
More information about the macports-changes
mailing list