Handle case in build.php when $A is not set master origin/HEAD origin/master
authorMarty Connor <mdc@etherboot.org>
Tue, 29 Sep 2009 16:42:27 +0000 (12:42 -0400)
committerMarty Connor <mdc@etherboot.org>
Tue, 29 Sep 2009 16:42:27 +0000 (12:42 -0400)
If build.php is called directly without $A being set, bring up configuration
page, since no action was specified.

build.php

index f751319..bdc9054 100644 (file)
--- a/build.php
+++ b/build.php
 // Get utility functions and set globals
 require_once "utils.php";
 
+// Make sure at least $A (action)  was supplied
+if ( ! isset ( $_POST['A'] ) ) {
+
+    // Present user with form to customize build options
+    require_once "customize-flags.php";
+
+    exit ();
+
 // If user chose "Customize" option on form
-if ( $_POST['A'] == "Customize" ) {
+} else if ( $_POST['A'] == "Customize" ) {
 
     // Present user with form to customize build options
     require_once "customize-flags.php";