diff options
author | Daouda Lo <daouda@mandriva.com> | 2004-02-19 18:18:10 +0000 |
---|---|---|
committer | Daouda Lo <daouda@mandriva.com> | 2004-02-19 18:18:10 +0000 |
commit | 0ace6066941759d1cf0cb6943305264afee0a530 (patch) | |
tree | 6eb778fdab4ee5014b919b07859fb66afd6a2abc /mdkonline | |
parent | d2182da0999cbc06251738944c5b88c7d0a1ecd7 (diff) | |
download | mgaonline-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-x | mdkonline | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -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"; } - - - |