summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--web/lib/pkgfuncs.inc.php8
-rw-r--r--web/template/pkg_search_form.php1
2 files changed, 9 insertions, 0 deletions
diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php
index 4b0fdbac..8ca88352 100644
--- a/web/lib/pkgfuncs.inc.php
+++ b/web/lib/pkgfuncs.inc.php
@@ -670,6 +670,7 @@ function pkg_display_details($id=0, $row, $SID="") {
* B - package base name (exact match)
* k - package keyword(s)
* m - package maintainer's username
+ * c - package co-maintainer's username
* s - package submitter's username
* do_Orphans - boolean. whether to search packages
* without a maintainer
@@ -746,6 +747,13 @@ function pkg_search_page($SID="") {
/* Search by maintainer. */
$q_where .= "AND Users.Username = " . $dbh->quote($_GET['K']) . " ";
}
+ elseif (isset($_GET["SeB"]) && $_GET["SeB"] == "c") {
+ /* Search by co-maintainer. */
+ $q_where .= "AND EXISTS (SELECT * FROM PackageComaintainers ";
+ $q_where .= "INNER JOIN Users ON Users.ID = PackageComaintainers.UsersID ";
+ $q_where .= "WHERE PackageComaintainers.PackageBaseID = PackageBases.ID ";
+ $q_where .= "AND Users.Username = " . $dbh->quote($_GET['K']) . ")";
+ }
elseif (isset($_GET["SeB"]) && $_GET["SeB"] == "s") {
/* Search by submitter. */
$q_where .= "AND SubmitterUID = " . intval(uid_from_username($_GET['K'])) . " ";
diff --git a/web/template/pkg_search_form.php b/web/template/pkg_search_form.php
index 795a796e..688cfcce 100644
--- a/web/template/pkg_search_form.php
+++ b/web/template/pkg_search_form.php
@@ -9,6 +9,7 @@ $searchby = array(
'B' => __('Exact Package Base'),
'k' => __('Keywords'),
'm' => __('Maintainer'),
+ 'c' => __('Co-maintainer'),
's' => __('Submitter')
);