Diff for /loncom/lonnet/perl/lonnet.pm between versions 1.939 and 1.942

version 1.939, 2008/01/21 20:21:28 version 1.942, 2008/02/21 10:04:35
Line 1650  sub absolute_url { Line 1650  sub absolute_url {
     return $protocol.$host_name;      return $protocol.$host_name;
 }  }
   
   #
   #   Server side include.
   # Parameters:
   #  fn     Possibly encrypted resource name/id.
   #  form   Hash that describes how the rendering should be done
   #         and other things.
   #  r      Optional reference that will be given the response.
   #         This is mostly provided so that the caller can implement
   #         error detection, recovery and retry policies.
   #     
   # Returns:
   #    The content of the response.
 sub ssi {  sub ssi {
   
     my ($fn,%form)=@_;      my ($fn,%form, $r)=@_;
   
     my $ua=new LWP::UserAgent;      my $ua=new LWP::UserAgent;
           
Line 1670  sub ssi { Line 1682  sub ssi {
     $request->header(Cookie => $ENV{'HTTP_COOKIE'});      $request->header(Cookie => $ENV{'HTTP_COOKIE'});
     my $response=$ua->request($request);      my $response=$ua->request($request);
   
       if ($r) {
    $$r = $response;
       }
   
     return $response->content;      return $response->content;
 }  }
   
Line 3527  sub set_userprivs { Line 3543  sub set_userprivs {
     }      }
     foreach my $role (keys(%{$allroles})) {      foreach my $role (keys(%{$allroles})) {
         my %thesepriv;          my %thesepriv;
         if (($role=~/^au/) || ($role=~/^ca/)) { $author=1; }          if (($role=~/^au/) || ($role=~/^ca/) || ($role=~/^aa/)) { $author=1; }
         foreach my $item (split(/:/,$$allroles{$role})) {          foreach my $item (split(/:/,$$allroles{$role})) {
             if ($item ne '') {              if ($item ne '') {
                 my ($privilege,$restrictions)=split(/&/,$item);                  my ($privilege,$restrictions)=split(/&/,$item);
Line 6751  sub EXT { Line 6767  sub EXT {
   
 sub get_reply {  sub get_reply {
     my ($reply_value) = @_;      my ($reply_value) = @_;
     if (wantarray) {      if (ref($reply_value) eq 'ARRAY') {
  return @$reply_value;          if (wantarray) {
       return @$reply_value;
           }
           return $reply_value->[0];
       } else {
           return $reply_value;
     }      }
     return $reply_value->[0];  
 }  }
   
 sub check_group_parms {  sub check_group_parms {

Removed from v.1.939  
changed lines
  Added in v.1.942


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>