--- loncom/lonnet/perl/lonnet.pm 2006/05/18 01:08:54 1.739 +++ loncom/lonnet/perl/lonnet.pm 2006/05/30 12:47:18 1.740 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.739 2006/05/18 01:08:54 raeburn Exp $ +# $Id: lonnet.pm,v 1.740 2006/05/30 12:47:18 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -52,6 +52,9 @@ use Storable qw(lock_store lock_nstore l use Time::HiRes qw( gettimeofday tv_interval ); use Cache::Memcached; use Digest::MD5; +use lib '/home/httpd/lib/perl'; +use LONCAPA; +use LONCAPA::Configuration; my $readit; my $max_connection_retries = 10; # Or some such value. @@ -1952,8 +1955,8 @@ sub courseiddump { sub dcmailput { my ($domain,$msgid,$message,$server)=@_; my $status = &Apache::lonnet::critical( - 'dcmailput:'.$domain.':'.&Apache::lonnet::escape($msgid).'='. - &Apache::lonnet::escape($message),$server); + 'dcmailput:'.$domain.':'.&escape($msgid).'='. + &escape($message),$server); return $status; } @@ -4824,7 +4827,7 @@ sub stat_file { ($udom,$uname,$file) = ($uri =~ m-/(?:uploaded|editupload)/?([^/]*)/?([^/]*)/?(.*)-); $file = 'userfiles/'.$file; - $dir = &Apache::loncommon::propath($udom,$uname); + $dir = &propath($udom,$uname); } if ($uri =~ m-^/res/-) { ($udom,$uname) = @@ -6460,7 +6463,7 @@ sub filelocation { my @ids=¤t_machine_ids(); foreach my $id (@ids) { if ($id eq $home) { $is_me=1; } } if ($is_me) { - $location=&Apache::loncommon::propath($udom,$uname). + $location=&propath($udom,$uname). '/userfiles/'.$filename; } else { $location=$Apache::lonnet::perlvar{'lonDocRoot'}.'/userfiles/'. @@ -6581,21 +6584,6 @@ sub freeze_escape { return &escape($value); } -# -------------------------------------------------------- Escape Special Chars - -sub escape { - my $str=shift; - $str =~ s/(\W)/"%".unpack('H2',$1)/eg; - return $str; -} - -# ----------------------------------------------------- Un-Escape Special Chars - -sub unescape { - my $str=shift; - $str =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg; - return $str; -} sub thaw_unescape { my ($value)=@_;