mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Allow for searching by package base name
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
68d99df781
commit
c1c77836a8
2 changed files with 13 additions and 2 deletions
|
@ -681,10 +681,19 @@ function pkg_search_page($SID="") {
|
||||||
$K = "%" . addcslashes($_GET['K'], '%_') . "%";
|
$K = "%" . addcslashes($_GET['K'], '%_') . "%";
|
||||||
$q_where .= "AND (Packages.Name LIKE " . $dbh->quote($K) . ") ";
|
$q_where .= "AND (Packages.Name LIKE " . $dbh->quote($K) . ") ";
|
||||||
}
|
}
|
||||||
elseif (isset($_GET["SeB"]) && $_GET["SeB"] == "x") {
|
elseif (isset($_GET["SeB"]) && $_GET["SeB"] == "b") {
|
||||||
|
/* Search by package base name. */
|
||||||
|
$K = "%" . addcslashes($_GET['K'], '%_') . "%";
|
||||||
|
$q_where .= "AND (PackageBases.Name LIKE " . $dbh->quote($K) . ") ";
|
||||||
|
}
|
||||||
|
elseif (isset($_GET["SeB"]) && $_GET["SeB"] == "N") {
|
||||||
/* Search by name (exact match). */
|
/* Search by name (exact match). */
|
||||||
$q_where .= "AND (Packages.Name = " . $dbh->quote($_GET['K']) . ") ";
|
$q_where .= "AND (Packages.Name = " . $dbh->quote($_GET['K']) . ") ";
|
||||||
}
|
}
|
||||||
|
elseif (isset($_GET["SeB"]) && $_GET["SeB"] == "B") {
|
||||||
|
/* Search by package base name (exact match). */
|
||||||
|
$q_where .= "AND (PackageBases.Name = " . $dbh->quote($_GET['K']) . ") ";
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
/* Search by name and description (default). */
|
/* Search by name and description (default). */
|
||||||
$K = "%" . addcslashes($_GET['K'], '%_') . "%";
|
$K = "%" . addcslashes($_GET['K'], '%_') . "%";
|
||||||
|
|
|
@ -4,7 +4,9 @@ include_once('pkgfuncs.inc.php');
|
||||||
$searchby = array(
|
$searchby = array(
|
||||||
'nd' => __('Name, Description'),
|
'nd' => __('Name, Description'),
|
||||||
'n' => __('Name Only'),
|
'n' => __('Name Only'),
|
||||||
'x' => __('Exact name'),
|
'b' => __('Package Base'),
|
||||||
|
'N' => __('Exact Name'),
|
||||||
|
'B' => __('Exact Package Base'),
|
||||||
'm' => __('Maintainer'),
|
'm' => __('Maintainer'),
|
||||||
's' => __('Submitter')
|
's' => __('Submitter')
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue