Commit 16a20693 authored by canyonknight's avatar canyonknight Committed by Lukas Fleischer
Browse files

pkgfuncs.inc.php: Rework query to avoid "Required by" duplicates



Packages with multiple DepConditions are returned multiple
times in the "Required by" column.

Limit SQL results to distinct packages.

Fixes FS#32478

Signed-off-by: default avatarcanyonknight <canyonknight@gmail.com>
Signed-off-by: default avatarLukas Fleischer <archlinux@cryptocrack.de>
parent dd61e561
......@@ -169,7 +169,7 @@ function package_required($name="", $dbh=NULL) {
if(!$dbh) {
$dbh = db_connect();
}
$q = "SELECT p.Name, PackageID FROM PackageDepends pd ";
$q = "SELECT DISTINCT p.Name, PackageID FROM PackageDepends pd ";
$q.= "JOIN Packages p ON pd.PackageID = p.ID ";
$q.= "WHERE DepName = " . $dbh->quote($name) . " ";
$q.= "ORDER BY p.Name";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment