diff options
-rwxr-xr-x | drakwizard.pl | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drakwizard.pl b/drakwizard.pl index 058e81e1..8c51e8ad 100755 --- a/drakwizard.pl +++ b/drakwizard.pl @@ -35,7 +35,6 @@ $::Wizard_no_previous = 1; $::Wizard_title = "Drakwizard"; $::Wiz_dir = '/usr/share/wizards/'; my $in = interactive->vnew; -my $standalone = 1; my %wiz = ( apache => ['Apache', N("Apache web server")], @@ -69,7 +68,7 @@ require "MDK/Wizard/$wiz{$ARGV[0]}[0].pm"; my ($wiz, $err) = "MDK::Wizard::$wiz{$ARGV[0]}[0]"->new($wiz{$ARGV[0]}[2]); if ($err) { $::Wizard_finished = 1; - $in->ask_okcancel(N("Error"), N($err)); + $in->ask_okcancel(N("Error"), translate($err)); $in->exit; } wizard($wiz->{o}); @@ -89,7 +88,7 @@ sub wizard { my ($res, $msg) = &{$o->{init}}; if (!$res) { $in->ask_okcancel(N("Error"), $msg); - exit if ! $::testing + exit() if ! $::testing } } @@ -113,16 +112,16 @@ sub wizard { if (ref $d->{boolean_list} && ref ${$d->{boolean_list}}) { my $i; foreach (@{${$d->{boolean_list}}}){ - push @{$data2}, { text => $_, type => 'bool', val => \${$d->{val}}->[$i], disabled => $d->{disabled} }; + push @$data2, { text => $_, type => 'bool', val => \${$d->{val}}->[$i], disabled => $d->{disabled} }; $i++ } } else { - push @{$data2}, $d + push @$data2, $d } } my $a = $in->ask_from($o->{name}, $page->{name}, $data2); if ($a) { - push @steps, $next if !$page->{ignore} && $steps[$#steps] ne $next; + push @steps, $next if !$page->{ignore} && $steps[-1] ne $next; $next = defined $page->{post} ? $page->{post}() : 0; defined $o->{pages}{$next} or $next = $page->{next}; } else { |