diff options
author | 2011-07-15 20:58:22 +0100 | |
---|---|---|
committer | 2011-07-15 20:58:22 +0100 | |
commit | d8ab9fad2e88341c8c6cc7c2913ea74625fbe9d2 (patch) | |
tree | 120725533f492e4cfbe1bcfb7b1b3f3a15507c04 | |
parent | Dropping WebUI stuff in a new branch, lots of this stuff needs tidying up and... (diff) | |
download | gentoaster-d8ab9fad2e88341c8c6cc7c2913ea74625fbe9d2.tar.gz gentoaster-d8ab9fad2e88341c8c6cc7c2913ea74625fbe9d2.tar.bz2 gentoaster-d8ab9fad2e88341c8c6cc7c2913ea74625fbe9d2.zip |
Handle \r\n when building the configuration file
-rw-r--r-- | web/process.php | 10 |
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 +?> |