[35193] trunk/www/ports.php

eridius at macports.org eridius at macports.org
Thu Mar 20 02:08:37 PDT 2008


Revision: 35193
          http://trac.macosforge.org/projects/macports/changeset/35193
Author:   eridius at macports.org
Date:     2008-03-20 02:08:37 -0700 (Thu, 20 Mar 2008)

Log Message:
-----------
Fix WHERE issue introduced in r35151 that broke the all ports listing

Modified Paths:
--------------
    trunk/www/ports.php

Modified: trunk/www/ports.php
===================================================================
--- trunk/www/ports.php	2008-03-20 08:55:20 UTC (rev 35192)
+++ trunk/www/ports.php	2008-03-20 09:08:37 UTC (rev 35193)
@@ -103,7 +103,12 @@
             $tables .= ", $portsdb_name.platforms AS pl";
             $criteria = "pl.portfile = p.name AND pl.platform = '" . mysql_real_escape_string($substr) . "'";
         }
-        $query = "SELECT DISTINCT $fields FROM $tables WHERE $criteria ORDER BY name";
+        if ($criteria == "") {
+            $where = "";
+        } else {
+            $where = "WHERE $criteria";
+        }
+        $query = "SELECT DISTINCT $fields FROM $tables $where ORDER BY name";
         $result = mysql_query($query);
         if ($result) {
 ?>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080320/38f6011c/attachment.html 


More information about the macports-changes mailing list