[35132] trunk/www/ports.php
jmpp at macports.org
jmpp at macports.org
Mon Mar 17 20:43:48 PDT 2008
Revision: 35132
http://trac.macosforge.org/projects/macports/changeset/35132
Author: jmpp at macports.org
Date: 2008-03-17 20:43:47 -0700 (Mon, 17 Mar 2008)
Log Message:
-----------
It's very rare to search by category, whereas searching by dependency is quite common (my local logs of my mirror installtion reveal so).
Therefore remove the former from the search menu options and the $by alternatives, while adding the latter to the search menu.
Modified Paths:
--------------
trunk/www/ports.php
Modified: trunk/www/ports.php
===================================================================
--- trunk/www/ports.php 2008-03-18 03:30:37 UTC (rev 35131)
+++ trunk/www/ports.php 2008-03-18 03:43:47 UTC (rev 35132)
@@ -39,9 +39,9 @@
<label>Search by:</label>
<select name="by">
<option value="name"<?php if ($by == "name") { print " selected=\"selected\""; } ?>>Software Title</option>
- <option value="desc"<?php if ($by == "desc") { print " selected=\"selected\""; } ?>>Description</option>
<option value="cat"<?php if ($by == "cat") { print " selected=\"selected\""; } ?>>Category</option>
<option value="maintainer"<?php if ($by == "maintainer") { print " selected=\"selected\""; } ?>>Maintainer</option>
+ <option value="dep"<?php if ($by == "dep") { print " selected=\"selected\""; } ?>>Dependency</option>
</select>
<input type="text" name="substr" size="40" />
<input type="submit" value="Search" />
@@ -83,12 +83,9 @@
if ($by == "name") {
$query .= " AND p.name LIKE '%" . mysql_real_escape_string($substr) . "%'";
}
- if ($by == "library") {
+ if ($by == "dependency") {
$query .= " AND p.name='" . mysql_real_escape_string($substr) . "'";
}
- if ($by == "desc") {
- $query .= " AND p.description LIKE '%" . mysql_real_escape_string($substr) . "%'";
- }
if ($by == "cat") {
$tables .= ", $portsdb_name.categories c";
$query .= " AND c.portfile=p.name AND c.category='" . mysql_real_escape_string($substr) . "'";
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080317/1269802d/attachment-0001.html
More information about the macports-changes
mailing list