diff options
author | Mael Dodin <mdodin@mandriva.org> | 2002-05-28 09:11:39 +0000 |
---|---|---|
committer | Mael Dodin <mdodin@mandriva.org> | 2002-05-28 09:11:39 +0000 |
commit | 7591dfe57e0b781b185a42f0760b362b2193beb8 (patch) | |
tree | 2223ca6068456339e169a2e0bc4c5f90aee2c71f | |
parent | 96f0dedb1cce77dae4ab791dd7b875bfb2ca547b (diff) | |
download | drakwizard-7591dfe57e0b781b185a42f0760b362b2193beb8.tar drakwizard-7591dfe57e0b781b185a42f0760b362b2193beb8.tar.gz drakwizard-7591dfe57e0b781b185a42f0760b362b2193beb8.tar.bz2 drakwizard-7591dfe57e0b781b185a42f0760b362b2193beb8.tar.xz drakwizard-7591dfe57e0b781b185a42f0760b362b2193beb8.zip |
-second commit after pixelisation and debug
-rw-r--r-- | server_wizard.pl | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/server_wizard.pl b/server_wizard.pl index a0cf2c1d..c6365a59 100644 --- a/server_wizard.pl +++ b/server_wizard.pl @@ -14,14 +14,15 @@ use XML::Parser; use standalone; use interactive; +sub translate { $_[0] } + sub member { my $e = shift; foreach (@_) { $e eq $_ and return 1 } 0 } sub get_parameter { - my ($tree, $tag) = @_; - my $page; + my ($o, $tree, $tag ,$page) = @_; foreach my $leaf (@$tree) { if (ref($leaf) eq 'ARRAY') { - get_parameter($leaf, $tag); + get_parameter($o, $leaf, $tag, $page); } elsif (ref($leaf) eq 'HASH') { my $common_freetext_chooser; my %actions = (Wizard => sub { @@ -33,7 +34,7 @@ sub get_parameter { }, Page => sub { my $old_page = $page; - $page = { %$leaf }; + push @$o, $page = { %$leaf }; $old_page->{next_page} = $page; }, Target => sub { @@ -98,7 +99,7 @@ sub navigation { if($page->{jumpScript}) { system("source $lib_script ; $page->{jumpScript}"); if ($page->{targetOK} && $page->{targetNOK}) { - find_name($o, $? == 256 ? $page->{targetNOK} : $page->{targetOK}), $page; + find_page($o, $? == 256 ? $page->{targetNOK} : $page->{targetOK}), $page; } else { $page->{next_page}, $page->{old_page}; } @@ -110,7 +111,7 @@ sub navigation { } } -my $o = {}; +my $o = []; get_parameter($o, XML::Parser->new(Style => 'Tree')->parsefile("server.wiz")); $in = 'interactive'->vnew; @@ -121,4 +122,4 @@ $::Wizard_pix_up = "wiz_draknet.png"; $::direct = /-direct/; $::Wizard_no_previous = 1; -navigation($o, $o->[0]{name}); +navigation($o, $o->[0]); |