aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--web/process.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/web/process.php b/web/process.php
index 149c1b7..1b68d03 100644
--- a/web/process.php
+++ b/web/process.php
@@ -11,10 +11,10 @@
$root_password = escapeshellarg($_POST["rootpassword"]);
$packages_list = escapeshellarg($_POST["packages"]);
$output_format = escapeshellarg($_POST["format"]);
-
-
+
+ $packages_list = str_replace("\r\n", " ", $packages_list);
$packages_list = str_replace("\n", " ", $packages_list);
-
+
$ini_string = "[vmconfig]
BUILD_ID='$build_id'
@@ -36,11 +36,11 @@ OUTPUT_FORMAT=$output_format";
$client = new GearmanClient();
$client->addServer();
$handle = $client->doBackground("invoke_image_build", $ini_string);
-
+
$db = mysql_connect("localhost","gentoaster","");
if(!$db) die("Could not connect to database ".mysql_error());
mysql_select_db("gentoaster");
mysql_query("INSERT INTO builds (id, handle) VALUES('".$build_id."','".$handle."')");
header("Location: finished.php?uuid=".$build_id);
-?> \ No newline at end of file
+?>