summaryrefslogtreecommitdiffstats
path: root/web/lib
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2015-10-24 18:56:08 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2015-10-24 18:59:04 +0200
commit66d12f0c377074a37a851871aeed426177b0de4a (patch)
tree0e02bff7e00f01ba27e173d2f85ddf6698a7651e /web/lib
parent8dcf225f63881ed95bb861025d2cd83110da7389 (diff)
downloadaur-66d12f0c377074a37a851871aeed426177b0de4a.tar.gz
aur-66d12f0c377074a37a851871aeed426177b0de4a.tar.xz
Highlight broken dependencies
If a dependency neither exists in the official repositories nor in the AUR, make it appear bold red. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'web/lib')
-rw-r--r--web/lib/pkgfuncs.inc.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php
index 31082415..cedc360e 100644
--- a/web/lib/pkgfuncs.inc.php
+++ b/web/lib/pkgfuncs.inc.php
@@ -336,6 +336,15 @@ function pkg_depend_link($name, $type, $cond, $arch, $pkg_id) {
*/
$providers = pkg_providers($name);
+ if (count($providers) == 0) {
+ $link = '<span class="broken">';
+ $link .= htmlspecialchars($name);
+ $link .= '</span>';
+ $link .= htmlspecialchars($cond) . ' ';
+ $link .= pkg_deplink_annotation($type, $arch, $desc);
+ return $link;
+ }
+
$link = htmlspecialchars($name);
foreach ($providers as $provider) {
if ($provider[1] == $name) {