summaryrefslogtreecommitdiffstats
path: root/web/lib
diff options
context:
space:
mode:
authorcanyonknight <canyonknight@gmail.com>2012-11-14 17:05:53 -0500
committerLukas Fleischer <archlinux@cryptocrack.de>2012-11-15 20:03:33 +0100
commit16a20693be07600e25dcf5edeb94e53699f63787 (patch)
tree7e29fc60b83de61283aa6df9e6b863b9cfc6a109 /web/lib
parentdd61e561a0a222bc0952e428081f6811236aeba8 (diff)
downloadaurweb-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')
-rw-r--r--web/lib/pkgfuncs.inc.php2
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";