diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-08-09 22:11:14 +0200 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-08-10 12:32:46 +0200 |
commit | 2b29fa4bb0329db2b85c436b82586869c0d763c2 (patch) | |
tree | 621daa41c553d27c6b9caeffe3ebf6139d007260 /web | |
parent | 13693fbdbc9c6625c627d3364cd00949461a61c6 (diff) | |
download | aur-2b29fa4bb0329db2b85c436b82586869c0d763c2.tar.gz aur-2b29fa4bb0329db2b85c436b82586869c0d763c2.tar.xz |
Group dependencies by dependency type
Implements FS#40888.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web')
-rw-r--r-- | web/template/pkg_details.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php index 7f01d2f5..8a3cbcc4 100644 --- a/web/template/pkg_details.php +++ b/web/template/pkg_details.php @@ -29,6 +29,16 @@ $grps = pkg_groups($row["ID"]); $deps = pkg_dependencies($row["ID"]); $requiredby = pkg_required($row["Name"]); +usort($deps, function($x, $y) { + if ($x[1] == "depends" && $y[1] != "depends") { + return -1; + } + if ($y[1] == "depends" && $x[1] != "depends") { + return 1; + } + return $x[1] == $y[1] ? strcmp($x[0], $y[0]) : strcmp($x[1], $y[1]); +}); + $rels = pkg_relations($row["ID"]); $rels_c = $rels_p = $rels_r = array(); foreach ($rels as $rel) { |