On Fri, 23 Dec 2016 at 23:14:57, Nodiv Byzero via aur-dev wrote:
--- web/lib/pkgfuncs.inc.php | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php index 4b0fdba..f61e52c 100644 --- a/web/lib/pkgfuncs.inc.php +++ b/web/lib/pkgfuncs.inc.php @@ -755,6 +755,11 @@ function pkg_search_page($SID="") { $K = "%" . addcslashes($_GET['K'], '%_') . "%"; $q_where .= "AND (Packages.Name LIKE " . $dbh->quote($K) . ") "; } + elseif (isset($_GET["SeB"]) && $_GET["SeB"] == "nd") { + /* Search by name. */ + $K = "%" . addcslashes($_GET['K'], '%_') . "%"; + $q_where .= "AND (Packages.Name LIKE " . $dbh->quote($K) . " OR Packages.Description LIKE " . $dbh->quote($K) . ") "; + }
It is actually intended that the default search also matches keywords, see commit 5fb7a74 (Replace categories with keywords, 2015-06-13). I agree that the current naming is slightly misleading, though, so I am open for suggestions. "Name, Description and Keywords" is too long. Something like "Keyword Search" is fine but might be confused with the "Keywords" search mode.
elseif (isset($_GET["SeB"]) && $_GET["SeB"] == "b") { /* Search by package base name. */ $K = "%" . addcslashes($_GET['K'], '%_') . "%"; -- 1.7.3.4