aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiam McLoughlin <hexxeh@hexxeh.net>2011-07-27 21:04:32 +0100
committerLiam McLoughlin <hexxeh@hexxeh.net>2011-07-27 21:04:32 +0100
commite27028f91f5fb2149054adbb89d14177f0e6f3db (patch)
treeb4a1c0729fbb92237fd6e25434b93b8b761c7e5e /web/status.php
parentMoved to using mysqli and prepared statements (diff)
downloadgentoaster-e27028f91f5fb2149054adbb89d14177f0e6f3db.tar.gz
gentoaster-e27028f91f5fb2149054adbb89d14177f0e6f3db.tar.bz2
gentoaster-e27028f91f5fb2149054adbb89d14177f0e6f3db.zip
Added simultaneous build settings
Diffstat (limited to 'web/status.php')
-rw-r--r--web/status.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/web/status.php b/web/status.php
index 719afe6..d2e8715 100644
--- a/web/status.php
+++ b/web/status.php
@@ -6,9 +6,16 @@
require_once "config.php";
$buildID = filter_input(INPUT_GET, "uuid", FILTER_UNSAFE_RAW);
+ $simultaneous = filter_input(INPUT_GET, "simultaneous", FILTER_VALIDATE_BOOLEAN);
$buildresult = "Unknown!";
$inprogress = false;
$builddone = false;
+ $simultaneousString = "";
+
+ if($simultaneous && !SIMULTANEOUS_BUILDS) {
+ $simultaneousString = "You were redirected to this page because you already have a ".
+ "build in progress. Simultaneous builds are disabled on this server.<br/><br/>";
+ }
$db = new mysqli(MYSQL_HOSTNAME, MYSQL_USERNAME,
MYSQL_PASSWORD, MYSQL_DATABASE);
@@ -19,6 +26,7 @@
$stmt = $db->prepare("SELECT handle FROM builds WHERE id = ?");
$stmt->bind_param("s", $buildID);
$stmt->execute();
+ $stmt->store_result();
if ($stmt->num_rows == 1) {
$stmt->bind_result($handle);
$stmt->fetch();
@@ -103,6 +111,7 @@
<div id="status" class="step">
<h1><?php echo $titleString; ?></h1>
<p>
+ <?php echo $simultaneousString; ?>
<?php echo $buildresult; ?>
<div id="progressbar"></div>
</p>