version 1.21, 2000/07/24 21:22:35
|
version 1.23, 2000/08/14 21:40:46
|
Line 23
|
Line 23
|
# get(namesp,array) : returns hash with keys from array filled in from namesp |
# get(namesp,array) : returns hash with keys from array filled in from namesp |
# put(namesp,hash) : stores hash in namesp |
# put(namesp,hash) : stores hash in namesp |
# dump(namesp) : dumps the complete namespace into a hash |
# dump(namesp) : dumps the complete namespace into a hash |
# ssi(url) : does a complete request cycle on url to localhost |
# ssi(url,hash) : does a complete request cycle on url to localhost, posts |
|
# hash |
# repcopy(filename) : replicate file |
# repcopy(filename) : replicate file |
# dirlist(url) : gets a directory listing |
# dirlist(url) : gets a directory listing |
# |
# |
Line 35
|
Line 36
|
# 04/05,05/29,05/31,06/01, |
# 04/05,05/29,05/31,06/01, |
# 06/05,06/26 Gerd Kortemeyer |
# 06/05,06/26 Gerd Kortemeyer |
# 06/26 Ben Tyszka |
# 06/26 Ben Tyszka |
# 06/30,07/15,07/17,07/18,07/20,07/21,07/22 Gerd Kortemeyer |
# 06/30,07/15,07/17,07/18,07/20,07/21,07/22,07/25 Gerd Kortemeyer |
|
# 08/14 Ben Tyszka |
|
|
package Apache::lonnet; |
package Apache::lonnet; |
|
|
Line 303 sub subscribe {
|
Line 305 sub subscribe {
|
|
|
sub repcopy { |
sub repcopy { |
my $filename=shift; |
my $filename=shift; |
|
$filename=~s/\/+/\//g; |
my $transname="$filename.in.transfer"; |
my $transname="$filename.in.transfer"; |
if ((-e $filename) || (-e $transname)) { return OK; } |
if ((-e $filename) || (-e $transname)) { return OK; } |
my $remoteurl=subscribe($filename); |
my $remoteurl=subscribe($filename); |
Line 360 sub repcopy {
|
Line 363 sub repcopy {
|
|
|
sub ssi { |
sub ssi { |
|
|
my $fn=shift; |
my ($fn,%form)=@_; |
|
|
my $ua=new LWP::UserAgent; |
my $ua=new LWP::UserAgent; |
my $request=new HTTP::Request('GET',"http://".$ENV{'HTTP_HOST'}.$fn); |
|
|
my $request; |
|
|
|
if (%form) { |
|
$request=new HTTP::Request('POST',"http://".$ENV{'HTTP_HOST'}.$fn); |
|
$request->content(join '&', map { "$_=$form{$_}" } keys %form); |
|
} else { |
|
$request=new HTTP::Request('GET',"http://".$ENV{'HTTP_HOST'}.$fn); |
|
} |
|
|
$request->header(Cookie => $ENV{'HTTP_COOKIE'}); |
$request->header(Cookie => $ENV{'HTTP_COOKIE'}); |
my $response=$ua->request($request); |
my $response=$ua->request($request); |
|
|
Line 625 sub definerole {
|
Line 637 sub definerole {
|
# ------------------------------------------------------------------ Plain Text |
# ------------------------------------------------------------------ Plain Text |
|
|
sub plaintext { |
sub plaintext { |
return $prp{$_}; |
my $short=shift; |
|
return $prp{$short}; |
} |
} |
|
|
# ----------------------------------------------------------------- Assign Role |
# ----------------------------------------------------------------- Assign Role |
Line 807 if ($readit ne 'done') {
|
Line 820 if ($readit ne 'done') {
|
} |
} |
} |
} |
|
|
|
|
$readit='done'; |
$readit='done'; |
&logthis('<font color=yellow>INFO: Read configuration</font>'); |
&logthis('<font color=yellow>INFO: Read configuration</font>'); |
} |
} |
} |
} |
1; |
1; |
|
|
|
|
|
|
|
|