diff options
author | canyonknight <canyonknight@gmail.com> | 2012-11-14 17:05:53 -0500 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2012-11-15 20:03:33 +0100 |
commit | 16a20693be07600e25dcf5edeb94e53699f63787 (patch) | |
tree | 7e29fc60b83de61283aa6df9e6b863b9cfc6a109 /web/lib/pkgfuncs.inc.php | |
parent | dd61e561a0a222bc0952e428081f6811236aeba8 (diff) | |
download | aurweb-16a20693be07600e25dcf5edeb94e53699f63787.tar.xz |
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: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/lib/pkgfuncs.inc.php')
-rw-r--r-- | web/lib/pkgfuncs.inc.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php index 8f84cdf..cfdd9a7 100644 --- a/web/lib/pkgfuncs.inc.php +++ b/web/lib/pkgfuncs.inc.php @@ -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"; |