From 48fd0caf51d04e7956618f632173a6c81f31e870 Mon Sep 17 00:00:00 2001 From: Antoine Ginies Date: Tue, 20 Jun 2006 15:52:38 +0000 Subject: fix ask_warn problem --- ftp_wizard/Proftpd.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'ftp_wizard') diff --git a/ftp_wizard/Proftpd.pm b/ftp_wizard/Proftpd.pm index 9ac8aaed..2f5cba0d 100755 --- a/ftp_wizard/Proftpd.pm +++ b/ftp_wizard/Proftpd.pm @@ -29,6 +29,7 @@ use services; use MDK::Wizard::Wizcommon; my $wiz = MDK::Wizard::Wizcommon->new; +my $in = interactive->vnew; my $file = "/etc/proftpd.conf"; @@ -88,7 +89,7 @@ $o->{pages} = { ], complete => sub { if ($o->{var}{wiz_ftp_external} == 0 && $o->{var}{wiz_ftp_internal} == 0) { - $::in->ask_warn(N("Error"), N("Please choose whether to allow a connection to FTP server from internal or external hosts.")); + $in->ask_warn(N("Error"), N("Please choose whether to allow a connection to FTP server from internal or external hosts.")); return 1; } else { return 0 } }, @@ -107,10 +108,10 @@ $o->{pages} = { ], complete => sub { if (!any { /bash/ } cat_("/etc/shells")) { - $::in->ask_warn(N("Error"), N("I can't find bash in list of shells! It seems you have modified it by hand! Please correct.")); + $in->ask_warn(N("Error"), N("I can't find bash in list of shells! It seems you have modified it by hand! Please correct.")); return 1; } - if (!$o->{var}{wiz_server_name}) { $::in->ask_warn(N("Error"), N("Need a server name")); return 1; } + if (!$o->{var}{wiz_server_name}) { $in->ask_warn(N("Error"), N("Need a server name")); return 1; } }, next => 'options_step2', }, @@ -128,7 +129,7 @@ $o->{pages} = { { label => N("Allow FTP resume:"), type => 'bool', val => \$o->{var}{wiz_ftp_resume} }, { label => N("Allow FXP:"), type => 'bool', val => \$o->{var}{wiz_ftp_fxp} }, ], - complete => sub { if ($o->{var}{wiz_port} !~ /^\d+$/) { $::in->ask_warn(N('Error'), N('FTP Port should be a number.')); return 1; } }, + complete => sub { if ($o->{var}{wiz_port} !~ /^\d+$/) { $in->ask_warn(N('Error'), N('FTP Port should be a number.')); return 1; } }, next => 'summary', }, warning_dhcp => { -- cgit v1.2.1