Diff for /loncom/lonnet/perl/lonnet.pm between versions 1.316 and 1.318

version 1.316, 2003/01/10 20:55:44 version 1.318, 2003/01/13 21:52:11
Line 864  sub userfileupload { Line 864  sub userfileupload {
 # Replace spaces by underscores  # Replace spaces by underscores
     $fname=~s/\s+/\_/g;      $fname=~s/\s+/\_/g;
 # Replace all other weird characters by nothing  # Replace all other weird characters by nothing
     $fname=~s/[^\w\.\-\+]//g;      $fname=~s/[^\w\.\-]//g;
 # See if there is anything left  # See if there is anything left
     unless ($fname) { return 'error: no uploaded file'; }      unless ($fname) { return 'error: no uploaded file'; }
     chop($ENV{'form.'.$formname});      chop($ENV{'form.'.$formname});
Line 1743  sub dump { Line 1743  sub dump {
    }     }
    return %returnhash;     return %returnhash;
 }  }
   
   # --------------------------------------------------------------- dumpcurrent
   sub dumpcurrent {
      my ($namespace,$udomain,$uname)=@_;
      if (!$udomain) { $udomain = $ENV{'user.domain'}; }
      if (!$uname)   { $uname   = $ENV{'user.name'};   }
      my $uhome = &homeserver($uname,$udomain);
      my $rep=reply("dumpcurrent:$udomain:$uname:$namespace",$uhome);
      &logthis("error = ".$rep) if ($rep =~ /^(error|no_such_host)/);
      return if ($rep =~ /^(error:|no_such_host)/);
      my @pairs=split(/\&/,$rep);
      my %returnhash=();
      foreach (@pairs) {
         my ($key,$value)=split(/=/,$_);
         my ($symb,$param) = split(/:/,$key);
         $returnhash{&unescape($symb)}->{&unescape($param)} = &unescape($value);
      }
      return %returnhash;
   }
   
 # --------------------------------------------------------------- put interface  # --------------------------------------------------------------- put interface
   

Removed from v.1.316  
changed lines
  Added in v.1.318


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