summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2006-02-27 15:03:42 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2006-02-27 15:03:42 +0000
commit2fe72bc9e9de06778198c00a94dd195eea819836 (patch)
tree8b9a9c0496f2393a395f64521f77bd70766b0667
parent01815cecee91fbb92cbc046a8b5a572eddc8b834 (diff)
downloadmgaonline-2fe72bc9e9de06778198c00a94dd195eea819836.tar
mgaonline-2fe72bc9e9de06778198c00a94dd195eea819836.tar.gz
mgaonline-2fe72bc9e9de06778198c00a94dd195eea819836.tar.bz2
mgaonline-2fe72bc9e9de06778198c00a94dd195eea819836.tar.xz
mgaonline-2fe72bc9e9de06778198c00a94dd195eea819836.zip
perl_checker fixes
-rwxr-xr-xmdkonline.gtk20
-rwxr-xr-xmdkonline_tui40
2 files changed, 30 insertions, 30 deletions
diff --git a/mdkonline.gtk b/mdkonline.gtk
index bcec49ba..ccb800b5 100755
--- a/mdkonline.gtk
+++ b/mdkonline.gtk
@@ -75,15 +75,15 @@ $o->{actions} = {
$p = $o->{nb}->get_current_page;
$stage{$p}->();
$p <= 0 and $o->{Prev}->set_sensitive(1);
- $p == 4 and main_quit()
+ $p == 4 and main_quit();
},
SkipWiz => sub {
- main_quit()
+ main_quit();
},
Prev => sub {
$p = $o->{nb}->get_current_page;
$o->{nb}->prev_page;
- $p <= 1 and init(0)
+ $p <= 1 and init(0);
}
};
foreach my $l ([ 'Next', N("Next"), 1 ], [ 'SkipWiz', N("Cancel") ], [ 'Prev', N("Previous"), 1 ]) {
@@ -175,16 +175,16 @@ sub subs_online() {
my $url = $explink . '?desuserid=' . $login . '&despwd=' . $despwd . '&user_email=' . $cmail;
#print "LOGIN = $login\nPASSWD = $despwd\nMAIL= $cmail\nURL=$url\n";
my $ret = mdkonline::subscribe_online($url);
- if ($ret eq 'OK') { $o->{nb}->next_page } else { raiseError($o->{mw}{window}, N("Error"), $ret) };
+ if ($ret eq 'OK') { $o->{nb}->next_page } else { raiseError($o->{mw}{window}, N("Error"), $ret) }
}
}
sub check_errors {
my ($login, $despwd, $despwdcfm, $cmail) = @_;
$login or raiseError($o->{mw}{window}, N("Error"), N("Please provide a login"));
if (!$::error && $despwd ne $despwdcfm) {
- raiseError($o->{mw}{window}, N("Error"), N("The passwords do not match\n Please try again\n"))
+ raiseError($o->{mw}{window}, N("Error"), N("The passwords do not match\n Please try again\n"));
} elsif (!$::error && check_valid_email($cmail) != 1) {
- raiseError($o->{mw}{window}, N("Error"), N("Not a valid mail address!\n"))
+ raiseError($o->{mw}{window}, N("Error"), N("Not a valid mail address!\n"));
}
}
sub set_entry_with_conf() {
@@ -208,7 +208,7 @@ sub send_conf_online() {
remove_wait_msg($ww);
if ($res eq 'TRUE' && $key) {
$o->{currentkey} = $key;
- $o->{nb}->next_page; $o->{Next}->set_label(N("Finish")); $o->{Prev}->hide
+ $o->{nb}->next_page; $o->{Next}->set_label(N("Finish")); $o->{Prev}->hide;
} else {
raiseError($o->{mw}{window}, N("Connection problem"), N("Problem occurs when uploading files, please try again"));
}
@@ -231,14 +231,14 @@ sub first_settings() {
}
sub final() {
$o->{Prev}->hide; $o->{SkipWiz}->hide;
- $o->{Next}->set_label(N("Finish"))
+ $o->{Next}->set_label(N("Finish"));
}
sub get_names() {
my ($login, $passwd, $machine);
$login = $o->{login}->get_text;
$passwd = md5_hex($o->{passwd}->get_text);
$machine = $o->{machine}->get_text;
- ($login, $passwd, $machine)
+ ($login, $passwd, $machine);
}
sub main_quit() {
# remove local files
@@ -253,7 +253,7 @@ sub main_quit() {
}
sub is_alphanum {
my ($x) = @_;
- my $_is_num = sub { $x =~ /^[[:alnum:]]+$/ ? 1 : 0 }
+ my $_is_num = sub { $x =~ /^[[:alnum:]]+$/ ? 1 : 0 };
}
sub check_passwd() {
my $link = 'http://www.mandrivaexpert.com/firsttimewizard/validusercheck.php';
diff --git a/mdkonline_tui b/mdkonline_tui
index 707dbfd0..62aac68d 100755
--- a/mdkonline_tui
+++ b/mdkonline_tui
@@ -29,7 +29,7 @@ use common;
use wizards;
use lang;
-BEGIN { unshift @::textdomains, 'mdkonline', 'drakfirstboot' };
+BEGIN { unshift @::textdomains, 'mdkonline', 'drakfirstboot' }
use mdkonline;
use Digest::MD5 qw(md5 md5_hex md5_base64);
@@ -54,7 +54,7 @@ my %choices = (
);
my $choice = $choices{account};
-my ($wiz, $login, $nlogin, $password, $npassword, $boxname, $cfmpassword, $email, $is_success, $key, $r, $createaccount, $sendconfres, $country);
+my ($wiz, $login, $nlogin, $password, $npassword, $boxname, $cfmpassword, $email, $is_success, $key, $createaccount, $sendconfres, $country);
my %countries = map { lang::c2name($_) => $_ } lang::list_countries();
$country = lang::c2name(lang::read('', $>)->{country});
@@ -63,7 +63,7 @@ sub read_conf() {
my %t = getVarsFromSh($wideconf);
my $host = chomp_(`hostname`);
$t{MACHINE} ||= $1 if $host =~ /(\w+)(.*)/;
- $login = $t{LOGIN}; $boxname = $t{MACHINE}
+ $login = $t{LOGIN}; $boxname = $t{MACHINE};
}
sub check_login {
my ($log, $pass, $box) = @_;
@@ -73,7 +73,7 @@ sub check_login {
my $clink = $expert_link . '/firsttimewizard/validusercheck.php' . '?u=' . $log . '&p=' . $pp;
$resp = mdkonline::get_from_URL($clink, "MdkOnline_tuiAgent/");
$resp->is_success and $res = $resp->content =~ /TRUE/ ? 1 : 0;
- $res
+ $res;
}
sub send_conf {
my ($log, $pass, $box) = @_;
@@ -87,13 +87,13 @@ sub send_conf {
($sendconfres, $key) = mdkonline::send_config($uplink, $tag);
mdkonline::hw_upload($log, $pass, $box);
undef $ww;
- ($sendconfres, $key)
+ ($sendconfres, $key);
}
sub create_new_account {
my ($log, $pass, $mail) = @_;
my $url = $expert_link . '/online3_CreateAccount.php' . '?desuserid=' . $log . '&despwd=' . $pass . '&user_email=' . $mail;
my $ca = mdkonline::subscribe_online($url);
- $ca
+ $ca;
}
$wiz = {
name => N("Mandriva Online"),
@@ -118,27 +118,27 @@ $wiz = {
{ label => N("Login:"), val => \$login },
{ label => N("Password:"), val => \$password, hidden => 1 },
{ label => N("Machine name:"), val => \$boxname },
- ],
+ ];
},
post => sub {
- my $_wait = $in->wait_message(N("Please wait"), N("Connecting to Mandriva Online website..."));
- $is_success = check_login($login, $password, $boxname); undef($_wait);
- "authenticate"
+ my $wait = $in->wait_message(N("Please wait"), N("Connecting to Mandriva Online website..."));
+ $is_success = check_login($login, $password, $boxname); undef $wait;
+ "authenticate";
},
},
authenticate => {
name => sub {
if ($is_success) {
- N("In order to benefit from Mandriva Online services,\nwe are about to upload your configuration.\n\nThe Wizard will now send the following information to Mandrakesoft:\n1) the list of packages you have installed on your system,\n2) your hardware configuration.\n\nIf you feel uncomfortable by that idea, or do not want to benefit from this service,\nplease press 'Cancel'. By pressing 'Next', you allow us to keep you informed\nabout security updates and useful upgrades via personalized email alerts.\nFurthermore, you benefit from discounted paid support services on\nwww.mandrivaexpert.com.")
+ N("In order to benefit from Mandriva Online services,\nwe are about to upload your configuration.\n\nThe Wizard will now send the following information to Mandrakesoft:\n1) the list of packages you have installed on your system,\n2) your hardware configuration.\n\nIf you feel uncomfortable by that idea, or do not want to benefit from this service,\nplease press 'Cancel'. By pressing 'Next', you allow us to keep you informed\nabout security updates and useful upgrades via personalized email alerts.\nFurthermore, you benefit from discounted paid support services on\nwww.mandrivaexpert.com.");
} else {
- N("Connection problem") . " " . N("or") . " " . N("wrong password:") . "\n" . N("Your login or password was wrong.\n Either you'll have to type it again, or you'll need to create an account on Mandriva Online.\n In the latter case, go back to the first step to connect to Mandriva Online.\n Be aware that you must also provide a Machine name \n (only alphabetical characters are admitted)")
+ N("Connection problem") . " " . N("or") . " " . N("wrong password:") . "\n" . N("Your login or password was wrong.\n Either you'll have to type it again, or you'll need to create an account on Mandriva Online.\n In the latter case, go back to the first step to connect to Mandriva Online.\n Be aware that you must also provide a Machine name \n (only alphabetical characters are admitted)");
}
},
no_back => $is_success ? 1 : 0,
post => sub {
if ($is_success) {
($sendconfres, $key) = send_conf($login, $password, $boxname);
- "upload"
+ "upload";
} else { "choices" }
}
},
@@ -150,11 +150,11 @@ $wiz = {
{ label => N("Password:"), val => \$npassword, hidden => 1 },
{ label => N("Confirm Password:"), val => \$cfmpassword, hidden => 1 },
{ label => N("Mail contact:"), val => \$email },
- ]
+ ];
},
post => sub {
$createaccount = $npassword ne $cfmpassword ? N("The passwords do not match\n Please try again\n") : $nlogin eq '' ? N("Please provide a login") : mdkonline::check_valid_email($email) == 0 ? N("Not a valid mail address!\n") : create_new_account($nlogin, $npassword, $email);
- "createaccount"
+ "createaccount";
}
},
createaccount => {
@@ -162,7 +162,7 @@ $wiz = {
$createaccount eq 'OK' ? "\n\n" . N("Mandriva Online Account successfully created.\nPlease click \"Next\" to authenticate and upload your configuration\n") : $createaccount;
},
post => sub {
- $createaccount eq 'OK' ? "account" : "noaccount"
+ $createaccount eq 'OK' ? "account" : "noaccount";
}
},
upload => {
@@ -170,25 +170,25 @@ $wiz = {
if ($sendconfres eq 'TRUE' && $key) {
"\n\n" . N("Your upload was successful!") . "\n\n" . N("From now you will receive on security and updates \nannouncements thanks to Mandriva Online.") . "\n\n" . N("Mandriva Online offers you the ability to automate the updates.\nA program will run regulary in your system waiting for new updates\n");
} else {
- N("Connection problem") . N("Problem occurs when uploading files, please try again")
+ N("Connection problem") . N("Problem occurs when uploading files, please try again");
}
},
data => sub {
if ($sendconfres eq 'TRUE' && $key) {
[
{ label => N("Country"), val => \$country, type => "combo", list => [ sort keys %countries ], not_edit => 0 }
- ]
+ ];
}
},
post => sub {
mdkonline::automated_upgrades($conffile, $login, md5_hex($password), $boxname, $key, $country, 'TRUE');
mdkonline::write_wide_conf($login, $boxname, $country);
- "end"
+ "end";
},
},
end => {
name => sub {
- N("Congratulations") . "\n\n" . N("Your Mandriva Online account has been successfully configured\n")
+ N("Congratulations") . "\n\n" . N("Your Mandriva Online account has been successfully configured\n");
},
end => 1,
no_back => 1,