diff options
Diffstat (limited to 'web/status.php')
-rw-r--r-- | web/status.php | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/web/status.php b/web/status.php index 20aacec..86e7e0e 100644 --- a/web/status.php +++ b/web/status.php @@ -1,13 +1,20 @@ <?php + // Gentoaster web interface finished stage + // Licensed under GPL v3, see COPYING file + + require_once "config.php"; + $buildID = $_GET["uuid"]; $buildresult = "Unknown!"; $inprogress = false; $builddone = false; - $db = mysql_connect("localhost", "gentoaster", ""); - if (!$db) die("Could not connect to database ".mysql_error()."\n"); - mysql_select_db("gentoaster"); + $db = mysql_connect(MYSQL_HOSTNAME, MYSQL_USERNAME, MYSQL_PASSWORD); + if (!$db) { + die("Could not connect to database ".mysql_error()."\n"); + } + mysql_select_db(MYSQL_DATABASE); $query = "SELECT handle FROM builds ". "WHERE id = '".mysql_real_escape_string($buildID)."'"; $result = mysql_query($query); @@ -33,7 +40,7 @@ "WHERE id = '".$cleanBuildID."'"; $result = mysql_query($query); $jobres = mysql_fetch_array($result); - if ($jobres[0] !== NULL) { + if ($jobres[0] !== null) { if ($jobres[0] == 0) { $buildresult = "Your build is complete! ". "What would you like to do now?". |