From 6287f4ade50c6e836673019428cc744dc9da45f3 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Wed, 15 Apr 2020 20:00:32 +0000 Subject: Improve known error display Drop spurious [ dep] when there is a space at the beginning/end of the attribute string and make the text more understandable in all cases. --- autobuild/results.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'autobuild/results.php') diff --git a/autobuild/results.php b/autobuild/results.php index 7614237..21afcb8 100644 --- a/autobuild/results.php +++ b/autobuild/results.php @@ -262,16 +262,21 @@ foreach ($failure as $rpm => $error) { # Types are currently build (use of a particular build system), # lang (use of a programming language) or err (a common build error). foreach (explode(" ", $attributes) as $attr) { + if (empty($attr)) { + continue; + } $attrname = ucfirst(explode("_", $attr)[1]); $icon_fn = "icons/" . str_replace("_", "-", $attr) . ".png"; if (file_exists($icon_fn)) { $attr_link = $attr_link . " "; - } else if (substr($attr, 0, 4) === "err_") { - # TODO: create link into wiki with information about these errors - $attr_link = $attr_link . " [$attrname err]"; } else { - $attr_link = $attr_link . " [$attrname dep]"; + if (substr($attr, 0, 4) === "err_") { + # TODO: create link into wiki with information about these errors + $attr_link = $attr_link . " [Common Error: $attrname]"; + } else { + $attr_link = $attr_link . " [$attr]"; + } } } } -- cgit v1.2.1