Commit 61480857 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Fix error in DOS partition selection; 0 is not valid in the EZ page

since we are saving just a single slice, and 0 is actually the MBR (by
local convention).
parent eb6c576c
...@@ -169,7 +169,7 @@ function SPITFORM($formfields, $errors) ...@@ -169,7 +169,7 @@ function SPITFORM($formfields, $errors)
<td><select name=\"formfields[loadpart]\"> <td><select name=\"formfields[loadpart]\">
<option value=X>Please Select </option>\n"; <option value=X>Please Select </option>\n";
for ($i = 0; $i <= 4; $i++) { for ($i = 1; $i <= 4; $i++) {
$selected = ""; $selected = "";
if (strcmp($formfields[loadpart], "$i") == 0) if (strcmp($formfields[loadpart], "$i") == 0)
...@@ -416,7 +416,7 @@ if (!isset($formfields[loadpart]) || ...@@ -416,7 +416,7 @@ if (!isset($formfields[loadpart]) ||
$errors["DOS Partition"] = "Not Selected"; $errors["DOS Partition"] = "Not Selected";
} }
elseif (! ereg("^[0-9]+$", $formfields[loadpart]) || elseif (! ereg("^[0-9]+$", $formfields[loadpart]) ||
$formfields[loadpart] < 0 || $formfields[loadpart] > 4) { $formfields[loadpart] <= 0 || $formfields[loadpart] > 4) {
$errors["DOS Partition"] = "Must be 1,2,3, or 4!"; $errors["DOS Partition"] = "Must be 1,2,3, or 4!";
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment