Changeset 35132


Ignore:
Timestamp:
Mar 18, 2008, 3:43:47 AM (12 years ago)
Author:
jmpp@…
Message:

It's very rare to search by description, 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/ports.php

    r35131 r35132  
    4040            <select name="by">
    4141                <option value="name"<?php if ($by == "name") { print " selected=\"selected\""; } ?>>Software Title</option>
    42                 <option value="desc"<?php if ($by == "desc") { print " selected=\"selected\""; } ?>>Description</option>
    4342                <option value="cat"<?php if ($by == "cat") { print " selected=\"selected\""; } ?>>Category</option>
    4443                <option value="maintainer"<?php if ($by == "maintainer") { print " selected=\"selected\""; } ?>>Maintainer</option>
     44                <option value="dep"<?php if ($by == "dep") { print " selected=\"selected\""; } ?>>Dependency</option>
    4545            </select>
    4646            <input type="text" name="substr" size="40" />
     
    8484            $query .= " AND p.name LIKE '%" . mysql_real_escape_string($substr) . "%'";
    8585        }
    86         if ($by == "library") {
     86        if ($by == "dependency") {
    8787            $query .= " AND p.name='" . mysql_real_escape_string($substr) . "'";
    88         }
    89         if ($by == "desc") {
    90             $query .= " AND p.description LIKE '%" . mysql_real_escape_string($substr) . "%'";
    9188        }
    9289        if ($by == "cat") {
Note: See TracChangeset for help on using the changeset viewer.