From b1c754300a774fbd01c2d88da20626e893a93095 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Thu, 5 Jun 2014 08:19:09 +0200 Subject: Fix links to AUR packages in optional dependencies Extend the SQL query that tries to find a package's dependencies so that optional dependencies with a description are correctly resolved. Fixes FS#40700. Signed-off-by: Lukas Fleischer --- web/lib/pkgfuncs.inc.php | 1 + 1 file changed, 1 insertion(+) (limited to 'web/lib/pkgfuncs.inc.php') diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php index 3bbf1a1..fed7c03 100644 --- a/web/lib/pkgfuncs.inc.php +++ b/web/lib/pkgfuncs.inc.php @@ -170,6 +170,7 @@ function pkg_dependencies($pkgid) { $dbh = DB::connect(); $q = "SELECT pd.DepName, dt.Name, pd.DepCondition, p.ID FROM PackageDepends pd "; $q.= "LEFT JOIN Packages p ON pd.DepName = p.Name "; + $q.= "OR SUBSTRING(pd.DepName FROM 1 FOR POSITION(': ' IN pd.DepName) - 1) = p.Name "; $q.= "LEFT JOIN DependencyTypes dt ON dt.ID = pd.DepTypeID "; $q.= "WHERE pd.PackageID = ". $pkgid . " "; $q.= "ORDER BY pd.DepName"; -- cgit v1.2.3-70-g09d2