Implement <skip_flavors> tag in wizards to skip specific steps on specific flavors

This commit is contained in:
Renato Botelho 2017-11-02 09:52:36 -02:00
parent c31dacf2e1
commit eb809299be

View File

@ -118,9 +118,25 @@ if ($_POST && !$input_errors) {
}
$stepid++;
if ($stepid > $totalsteps) {
$stepid = $totalsteps;
}
while (!empty($pkg['step'][$stepid]['skip_flavors'])) {
$skip = false;
foreach (explode(',', $pkg['step'][$stepid]['skip_flavors']) as $flavor) {
if ($flavor == $g['default-config-flavor']) {
$skip = true;
break;
}
}
if ($skip) {
$stepid++;
} else {
break;
}
}
if ($stepid > $totalsteps) {
$stepid = $totalsteps;
}
$title = preg_replace("/pfSense/i", $g['product_name'], $pkg['step'][$stepid]['title']);