summaryrefslogtreecommitdiff
path: root/web/lib
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2014-06-05 08:19:09 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2014-06-05 15:12:10 +0200
commitb1c754300a774fbd01c2d88da20626e893a93095 (patch)
tree78bbf2a5f6255aadd56dbb2ba860cb46744875ba /web/lib
parent13820d2b168e96efa83aa04aab3e5a06c97fe78b (diff)
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 <archlinux@cryptocrack.de>
Diffstat (limited to 'web/lib')
-rw-r--r--web/lib/pkgfuncs.inc.php1
1 files changed, 1 insertions, 0 deletions
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";