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') diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php index 3bbf1a1e..fed7c03c 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-24-g4f1b