diff options
author | Daouda Lo <daouda@mandriva.com> | 2004-07-09 10:33:56 +0000 |
---|---|---|
committer | Daouda Lo <daouda@mandriva.com> | 2004-07-09 10:33:56 +0000 |
commit | 9318ebc5a59e237628457e379d7be3ece5f8d704 (patch) | |
tree | 29084b387ed6d3dcf2091e02b95d493d9850d4b1 /mdkapplet | |
parent | 701cbc36ba5feee09e0578c21cdea2c7a0d68a89 (diff) | |
download | mgaonline-9318ebc5a59e237628457e379d7be3ece5f8d704.tar mgaonline-9318ebc5a59e237628457e379d7be3ece5f8d704.tar.gz mgaonline-9318ebc5a59e237628457e379d7be3ece5f8d704.tar.bz2 mgaonline-9318ebc5a59e237628457e379d7be3ece5f8d704.tar.xz mgaonline-9318ebc5a59e237628457e379d7be3ece5f8d704.zip |
rewrite big chunks of code, added mdkonline.pm
Diffstat (limited to 'mdkapplet')
-rwxr-xr-x | mdkapplet | 15 |
1 files changed, 5 insertions, 10 deletions
@@ -21,10 +21,13 @@ ################################################################################ use strict; -use lib qw(/usr/lib/libDrakX); +use lib qw(/usr/lib/libDrakX /usr/lib/libDrakX/drakfirsttime); use common; +use mdkonline; + use Digest::MD5; + BEGIN { unshift @::textdomains, 'mdkonline' } use Gtk2::TrayIcon; @@ -208,19 +211,11 @@ sub silentCheck { my $link = "http://www.mandrakeonline.net/online3_RemoteAction.php" . '?action=UpdateList'; my %h = getVarsFromSh($conffile); my $u; - require LWP::UserAgent; - require HTTP::Request::Common; - require HTTP::Request; logIt(N("Computing new updates...\n")); - my $ua = LWP::UserAgent->new; - $ua->agent("MdkAppletAgent/0.1" . $ua->agent); - $ua->env_proxy; - # my $request = HTTP::Request->new(GET => $link . '&log=' . "ayomigration" . '&host=' . "online"); - my $request = HTTP::Request->new(GET => $link . '&log=' . $h{LOGIN} . '&host=' . $h{MACHINE}); my $lnk = $link . '&log=' . $h{LOGIN} . '&host=' . $h{MACHINE}; logIt(N("Connecting to") . " $lnk ...\n"); gtkflush(); go2State('busy'); gtkflush(); - my $response = $ua->request($request); + my $response = mdkonline::get_from_URL($link, 'MdkAppletAgent/0.1'); my $ct = $response->content; # print "\nCONTENTS = $ct\n"; # logIt(N("Response from MandrakeOnline server\n") . "$ct"); |