diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2018-03-23 20:18:01 +0100 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2018-03-23 20:18:01 +0100 |
commit | c30de005f885202f24929bd4e3d3f5c885efbc0a (patch) | |
tree | 44b512356b80d3adad6521ad74f38ff9271f6c0d /web-scripts/blacklist.php | |
parent | ff768f012bfef1bf264d06214aead70a58c0ff90 (diff) | |
parent | 497779257683e1c4ee2f2bf4c25687b34323c6be (diff) | |
download | builder-c30de005f885202f24929bd4e3d3f5c885efbc0a.tar.xz |
Merge branch 'master' into opcodes
Diffstat (limited to 'web-scripts/blacklist.php')
-rw-r--r-- | web-scripts/blacklist.php | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/web-scripts/blacklist.php b/web-scripts/blacklist.php new file mode 100644 index 0000000..c2810c6 --- /dev/null +++ b/web-scripts/blacklist.php @@ -0,0 +1,48 @@ +<html> +<head> +<title>Blacklisted packages</title> +<link rel="stylesheet" type="text/css" href="/static/style.css"> +</head> +<body> +<table> +<tr><th>architecture</th><th>package</th><th>reason</th></tr> +<?php + +$mysql = new mysqli("localhost", "webserver", "empty", "buildmaster"); +if ($mysql->connect_error) { + die("Connection failed: " . $mysql->connect_error); +} +if ( ! $result = $mysql -> query( + "SELECT DISTINCT `architectures`.`name` AS `architecture`,`package_sources`.`pkgbase`,`build_assignments`.`is_black_listed` " . + "FROM `build_assignments` " . + "JOIN `architectures` ON `build_assignments`.`architecture`=`architectures`.`id` " . + "JOIN `package_sources` ON `build_assignments`.`package_source`=`package_sources`.`id` " . + "WHERE `build_assignments`.`is_black_listed` IS NOT NULL " . + "ORDER BY `package_sources`.`pkgbase`")) { + die($mysql->error); +} +if ($result -> num_rows > 0) { + while($row = $result->fetch_assoc()) { + print "<tr><td>"; + print $row["architecture"]; + print "</td><td>"; + print $row["pkgbase"]; + print "</td><td>"; + print preg_replace( + array ( + "/FS32#(\\d+)/", + "/FS#(\\d+)/" + ), + array ( + "<a href=\"https://bugs.archlinux32.org/index.php?do=details&task_id=$1\">$0</a>", + "<a href=\"https://bugs.archlinux.org/task/$1\">$0</a>" + ), + $row["is_black_listed"] + ); + print "</td></tr>\n"; + } +} +?> +</table> +</body> +</html> |