From 5a8a69b3126309dd7024f5d9a1b106024c0ffa4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20Lu=E7i?= Date: Wed, 10 Mar 2010 10:14:37 +0000 Subject: Only extract timezone info if we have a field type 'timezone_select' --- usr/local/www/wizard.php | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'usr/local/www/wizard.php') 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\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\n"; echo $field['displayname']; -- cgit v1.1