Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/buildmaster/to-delete.php
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-04-17 10:04:07 +0200
committerErich Eckner <git@eckner.net>2018-04-17 10:04:07 +0200
commit5c5ed42237757efcf698a36c37cf9bd0630232c3 (patch)
tree184a92122c95c33ccb09aa5db2955af2d32e2771 /buildmaster/to-delete.php
parent8af016645fee5c0b22e69d46de9b3401c1bc82d3 (diff)
buildmaster/*.php: use lib/mysql.php
Diffstat (limited to 'buildmaster/to-delete.php')
-rw-r--r--buildmaster/to-delete.php41
1 files changed, 21 insertions, 20 deletions
diff --git a/buildmaster/to-delete.php b/buildmaster/to-delete.php
index dfa5a39..4da10a2 100644
--- a/buildmaster/to-delete.php
+++ b/buildmaster/to-delete.php
@@ -1,3 +1,24 @@
+<?php
+
+ include "lib/mysql.php";
+
+ $result = mysql_run_query(
+ "SELECT " .
+ "`repositories`.`name` AS `repo`," .
+ "`binary_packages`.`pkgname`," .
+ "`binary_packages`.`epoch`," .
+ "`binary_packages`.`pkgver`," .
+ "`binary_packages`.`pkgrel`," .
+ "`binary_packages`.`sub_pkgrel`," .
+ "`architectures`.`name` AS `arch` " .
+ "FROM `binary_packages` " .
+ "JOIN `architectures` ON `binary_packages`.`architecture`=`architectures`.`id` " .
+ "JOIN `repositories` ON `binary_packages`.`repository`=`repositories`.`id` " .
+ "WHERE `binary_packages`.`is_to_be_deleted` " .
+ "AND NOT `repositories`.`name` IN (\"build-support\",\"build-list\",\"deletion-list\")"
+ );
+
+?>
<html>
<head>
<title>List of packages to be deleted</title>
@@ -6,26 +27,6 @@
<body>
<?php
-$mysql = new mysqli("localhost", "webserver", "empty", "buildmaster");
-if ($mysql->connect_error) {
- die("Connection failed: " . $mysql->connect_error);
-}
-
-$result = $mysql -> query(
- "SELECT " .
- "`repositories`.`name` AS `repo`," .
- "`binary_packages`.`pkgname`," .
- "`binary_packages`.`epoch`," .
- "`binary_packages`.`pkgver`," .
- "`binary_packages`.`pkgrel`," .
- "`binary_packages`.`sub_pkgrel`," .
- "`architectures`.`name` AS `arch` " .
- "FROM `binary_packages` " .
- "JOIN `architectures` ON `binary_packages`.`architecture`=`architectures`.`id` " .
- "JOIN `repositories` ON `binary_packages`.`repository`=`repositories`.`id` " .
- "WHERE `binary_packages`.`is_to_be_deleted` " .
- "AND NOT `repositories`.`name` IN (\"build-support\",\"build-list\",\"deletion-list\")"
-);
if ($result -> num_rows > 0) {
$count = 0;