summaryrefslogtreecommitdiffstats
path: root/usr/local/www/wizard.php
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2010-03-10 10:14:37 +0000
committerErmal Luçi <eri@pfsense.org>2010-03-10 10:14:37 +0000
commit5a8a69b3126309dd7024f5d9a1b106024c0ffa4e (patch)
treec74a04935dd776297a4cae0a703962a3a4058777 /usr/local/www/wizard.php
parentba9e9bbfed4bfafbc980ae348e1fc365c8c4ee8d (diff)
downloadpfsense-5a8a69b3126309dd7024f5d9a1b106024c0ffa4e.zip
pfsense-5a8a69b3126309dd7024f5d9a1b106024c0ffa4e.tar.gz
Only extract timezone info if we have a field type 'timezone_select'
Diffstat (limited to 'usr/local/www/wizard.php')
-rwxr-xr-xusr/local/www/wizard.php28
1 files changed, 17 insertions, 11 deletions
diff --git a/usr/local/www/wizard.php b/usr/local/www/wizard.php
index 88da606..9a099c0 100755
--- a/usr/local/www/wizard.php
+++ b/usr/local/www/wizard.php
@@ -52,9 +52,10 @@ if (isset($_POST['stepid']))
if (!$stepid) $stepid = "0";
$xml = htmlspecialchars($_GET['xml']);
-if($_POST['xml']) $xml = htmlspecialchars($_POST['xml']);
+if($_POST['xml'])
+ $xml = htmlspecialchars($_POST['xml']);
-if($xml == "") {
+if(empty($xml)) {
$xml = "not_defined";
print_info_box_np("ERROR: Could not open " . $xml . ".");
die;
@@ -67,20 +68,17 @@ if($xml == "") {
}
}
+if (!is_array($pkg)) {
+ print_info_box_np("ERROR: Could not parse {$g['www_path']}/wizards/{$xml} file.");
+ die;
+}
+
$title = $pkg['step'][$stepid]['title'];
$description = $pkg['step'][$stepid]['description'];
$totalsteps = $pkg['totalsteps'];
-exec('/usr/bin/tar -tzf /usr/share/zoneinfo.tgz', $timezonelist);
-$timezonelist = array_filter($timezonelist, 'is_timezone');
-sort($timezonelist);
-
-/* kill carriage returns */
-for($x=0; $x<count($timezonelist); $x++)
- $timezonelist[$x] = str_replace("\n", "", $timezonelist[$x]);
-
if ($pkg['step'][$stepid]['includefile'])
- require($pkg['step'][$stepid]['includefile']);
+ require_once($pkg['step'][$stepid]['includefile']);
if($pkg['step'][$stepid]['stepsubmitbeforesave']) {
eval($pkg['step'][$stepid]['stepsubmitbeforesave']);
@@ -451,6 +449,14 @@ function enablechange() {
}
echo "</select>\n";
} else if ($field['type'] == "timezone_select") {
+ exec('/usr/bin/tar -tzf /usr/share/zoneinfo.tgz', $timezonelist);
+ $timezonelist = array_filter($timezonelist, 'is_timezone');
+ sort($timezonelist);
+
+ /* kill carriage returns */
+ for($x=0; $x<count($timezonelist); $x++)
+ $timezonelist[$x] = str_replace("\n", "", $timezonelist[$x]);
+
if ($field['displayname']) {
echo "<td width=\"22%\" align=\"right\" class=\"vncellreq\">\n";
echo $field['displayname'];
OpenPOWER on IntegriCloud