[aur-dev] [PATCH 1/2] Fix searching by category
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> --- web/lib/pkgfuncs.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php index f5eb11d..76fed89 100644 --- a/web/lib/pkgfuncs.inc.php +++ b/web/lib/pkgfuncs.inc.php @@ -422,7 +422,7 @@ function pkg_search_page($SID="") { * variable values more sensible. */ if (isset($_GET["C"]) && intval($_GET["C"])) { - $q_where .= "AND Packages.CategoryID = ".intval($_GET["C"])." "; + $q_where .= "AND PackageBases.CategoryID = ".intval($_GET["C"])." "; } if (isset($_GET['K'])) { -- 1.9.1
Add the query string when redirecting to the package details page. This fixes the target of the "All comments" link of non-split packages. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> --- web/html/pkgbase.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/html/pkgbase.php b/web/html/pkgbase.php index 3369049..0d1b74a 100644 --- a/web/html/pkgbase.php +++ b/web/html/pkgbase.php @@ -118,7 +118,11 @@ if (check_token()) { $pkgs = pkgbase_get_pkgnames($base_id); if (count($pkgs) == 1) { /* Not a split package. Redirect to the package page. */ - header('Location: ' . get_pkg_uri($pkgs[0])); + if (empty($_SERVER['QUERY_STRING'])) { + header('Location: ' . get_pkg_uri($pkgs[0])); + } else { + header('Location: ' . get_pkg_uri($pkgs[0]) . '?' . $_SERVER['QUERY_STRING']); + } } $details = pkgbase_get_details($base_id); -- 1.9.1
participants (1)
-
Lukas Fleischer