summaryrefslogtreecommitdiffstats
path: root/mdkonline
diff options
context:
space:
mode:
authorDaouda Lo <daouda@mandriva.com>2004-02-19 18:18:10 +0000
committerDaouda Lo <daouda@mandriva.com>2004-02-19 18:18:10 +0000
commit0ace6066941759d1cf0cb6943305264afee0a530 (patch)
tree6eb778fdab4ee5014b919b07859fb66afd6a2abc /mdkonline
parentd2182da0999cbc06251738944c5b88c7d0a1ecd7 (diff)
downloadmgaonline-0ace6066941759d1cf0cb6943305264afee0a530.tar
mgaonline-0ace6066941759d1cf0cb6943305264afee0a530.tar.gz
mgaonline-0ace6066941759d1cf0cb6943305264afee0a530.tar.bz2
mgaonline-0ace6066941759d1cf0cb6943305264afee0a530.tar.xz
mgaonline-0ace6066941759d1cf0cb6943305264afee0a530.zip
- tests with ayo
Diffstat (limited to 'mdkonline')
-rwxr-xr-xmdkonline24
1 files changed, 12 insertions, 12 deletions
diff --git a/mdkonline b/mdkonline
index 51805c2c..e15c8d80 100755
--- a/mdkonline
+++ b/mdkonline
@@ -150,34 +150,37 @@ gtkappend_page($o->{nb},
))));
init(1);
-$o->{country}->set_popdown_strings(country());
+$o->{country}->set_popdown_strings(sort(getCountry()));
$o->{mw}{rwindow}->show_all;
Gtk2->main;
ugtk2->exit(0);
sub subsOnline {
- my $explink = 'http://www.mandrakeexpert.com/online3_CreateAccount.php?';
+ my $explink = 'http://www.mandrakeexpert.com/online3_CreateAccount.php';
my $login = $o->{clogin}->get_text;
my $despwd = $o->{cpasswd}->get_text;
my $despwdcfm = $o->{cconfirm}->get_text;
my $cmail = $o->{cmail}->get_text;
$::error = 0;
checkErrors($login, $despwd, $despwdcfm, $o->{cmail});
- print "Error = $::error";
+ # print "Error = $::error";
if (!$::error) {
- my $ret = requestURL($explink . '?desuserid=' . $login . '&despwd=' . $despwd . '&user_email=' . $cmail);
+ my $url = $explink . '?desuserid=' . $login . '&despwd=' . $despwd . '&user_email=' . $cmail;
+ print "LOGIN = $login\nPASSWD = $despwd\nMAIL= $cmail\nURL=$url\n";
+ my $ret = requestURL($url);
my $result = {
- 0 => sub { !$::error and $o->{nb}->next_page},
- 11 => sub { raiseError($o->{mw}->{window},N("Creation"), N("Login and Password should be < 12 characters\n")) },
- 12 => sub { raiseError($o->{mw}->{window},N("Special Characters"), N("Special Characters are not allowed\n")) },
- 13 => sub { raiseError($o->{mw}->{window},N("Empty Fields"), N("Please fill up all fields\n")) },
+ 10 => sub { !$::error and $o->{nb}->next_page},
+ 11 => sub { raiseError($o->{mw}->{window},N("Creation"), N("Login and password should be less than 12 characters\n")) },
+ 12 => sub { raiseError($o->{mw}->{window},N("Special characters"), N("Special characters are not allowed\n")) },
+ 13 => sub { raiseError($o->{mw}->{window},N("Empty fields"), N("Please fill in all fields\n")) },
14 => sub { raiseError($o->{mw}->{window},N("Email"), N("Email not valid\n")) },
15 => sub { raiseError($o->{mw}->{window},N("Change account"), N("Account already exist\n")) },
};
if ($ret->is_success) {
my $content = $ret->content;
- if ($content =~ m/(\d+)/) { my $code = sprintf("%d",$1);print "CODE = $code"; eval { $result->{$code}->() } }
+ print "CODE_RETOUR = $content\n";
+ if ($content =~ m/(\d+)/) { my $code = sprintf("%d",$1);print "CODE = $code\n"; eval { $result->{$code}->() } }
} else { raiseError($o->{mw}->{window}, N("Server Problem"), N("Problem connecting to server \n")) }
}
}
@@ -379,6 +382,3 @@ if [ -f /root/.mdkupdate ]; then /usr/bin/mdkupdate; fi
);
chmod 0755, "/etc/cron.daily/mdkupdate";
}
-
-
-