From 3720bdf6b264cb4bb603e4199f2758598c260ed4 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sat, 26 Apr 2014 13:17:28 +0200 Subject: Display package relations on the details page This adds information from the following three fields to the package details page: * conflicts * provides * replaces If either of these fields is empty, it is not displayed. Signed-off-by: Lukas Fleischer --- web/template/pkg_details.php | 64 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) (limited to 'web/template/pkg_details.php') diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php index f0bfa0b8..da90c9d7 100644 --- a/web/template/pkg_details.php +++ b/web/template/pkg_details.php @@ -25,6 +25,22 @@ $urlpath = URL_DIR . substr($row['BaseName'], 0, 2) . "/" . $row['BaseName']; $deps = pkg_dependencies($row["ID"]); $requiredby = pkg_required($row["Name"]); +$rels = pkg_relations($row["ID"]); +$rels_c = $rels_p = $rels_r = array(); +foreach ($rels as $rel) { + switch ($rel[1]) { + case "conflicts": + $rels_c[] = $rel; + break; + case "provides": + $rels_p[] = $rel; + break; + case "replaces": + $rels_r[] = $rel; + break; + } +} + # $sources[0] = 'src'; $sources = pkg_sources($row["ID"]); ?> @@ -156,6 +172,54 @@ if ($SID && ($uid == $row["MaintainerUID"] || + 0): ?> + + + + + + + , + + + + + + + + + 0): ?> + + + + + + + , + + + + + + + + + 0): ?> + + + + + + + , + + + + + + + +